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

Powershell Users in a Group list and then export users recursive

$
0
0

Hi,
I am wanting to find out how to put the two together. I have the following script for finding users/groups that have access to certain folders.

$project_folder = "\\UNC PATH"
get-acl $project_folder | %{ $_.Access  } | ft -property IdentityReference, AccessControlType, FileSystemRight

and then the following for finding AD Groupmembers with the recursive parameter

Get-ADgroupmember -identity “ADGroupmember” -Recursive | get-aduser -property displayname | select name, displayname >C:\output\Members.txt

How can I put the two together so I get a list of all users/groups by using the first script to list them and then list all the users in that are in any groups to a txt file...

PS - Powershell noob.


Thanks


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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