Link to home
Start Free TrialLog in
Avatar of Okiegurl
OkiegurlFlag for United States of America

asked on

Ad Groups with permissions exported

I'm very new to powershell but have been tasked with getting all of the groups with permissions exported to upper management. I need to know what shares have full control?
ASKER CERTIFIED SOLUTION
Avatar of footech
footech
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
$RootPath = "C:\Temp"

$Folders = dir $RootPath -recurse | where {$_.psiscontainer -eq $true}

foreach ($Folder in $Folders){
	$ACLs = get-acl $Folder.fullname | ForEach-Object { $_.Access  }
	Foreach ($ACL in $ACLs){ 
		$Folder.Fullname + "," + $ACL.FileSystemRights  + "," + $ACL.IdentityReference  + "," + $ACL.AccessControlType + "," + $ACL.IsInherited + "," + $ACL.InheritanceFlags + "," + $ACL.PropagationFlags;
	}
}

Open in new window

Avatar of Okiegurl

ASKER

I'm sorry I wasn't clearer. I need to know what shares have full control on every server in my network. It can be done by ad groups. I have 1438 servers so I can't do this manually by server
Just to be clear, you're referring to share permissions and not NTFS permissions, correct?
If so, try what I posted.
Solution has been verified to provide share permissions as asked for.