Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Script to show access to all shared folders on a server

$
0
0

I was asked by management the other day to come up with a list of what departmental shares our Helpdesk has access to (not sure why, was just asked to come up with the list). This can be either via direct ACL entries or via group membership. Luckily I was only asked to get the top (departmental) level, I.E. all our departmental shares are in one location, and I only need to show the first level down.

Since I'm posting here, obviously (or maybe not) I've decided to do this in PowerShell.

I'm thinking what I need to do is get a list of each member of the Helpdesk AD group and for each one do the following:

  1. Show any access that they have directly
  2. List the groups they are members of
  3. Show any access those groups have

Maybe I'm focusing too much on the 10' view when I need to be looking at the 30,000' foot view, but I can't wrap my brain around how to do this.

Any suggestions? I have a couple of code snippets to get ACLs and get groups for a given user, I guess I need to just nest a bunch of "foreach" statements and then figure out a way to format the whole pile for presentation?


zarberg@gmail.com


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>