elwayisgod
asked on
Powershell Script to list Permissions
Hi,
We need a script that will cycle through all sub directories from a starting point and give us all users/accounts that have access. Then we can open in Excel and analyze. I have the below code, but it won't look beyond the D:\Data\Triggers directory. Is there a way to cycle through all directories in the D:\ drive?
We need a script that will cycle through all sub directories from a starting point and give us all users/accounts that have access. Then we can open in Excel and analyze. I have the below code, but it won't look beyond the D:\Data\Triggers directory. Is there a way to cycle through all directories in the D:\ drive?
Invoke-Command -ScriptBlock {get-acl D:\Data\Triggers |
select -expand access } |
export-csv \\servername\output\permissions.csv
ASKER
Hmm. I guess I only have PowerShell 2.0 :(
If this will be running on a computer that you have some control over (versus a locked down corporate server) then you could update to something newer (3.x, 4.x, 5.x). Lots of notes on this in Microsoft sites, I think Windows 8 was the trickiest one. I seem to recall oBdA may have some links on this too, but I may be confused.
~bp
~bp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
oBdA,
The version 2.0 script works. Is there a way to get the output into a .csv file and in columnar format?
The version 2.0 script works. Is there a way to get the output into a .csv file and in columnar format?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
Get-Help .\Get-AclReport
(or whatever you want to name it) is supported.
Open in new window