• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Script to compare Win folder permissions, identical structure?

lokiju

Lifer
Can someone point me maybe in the right direct for comparing folders and their subfolders permissions against an identical but other folder structure?

I have two volumes on one server 2003 server and while I'm confident the structure and contents are identical, I need to compare their permissions to see if there's any difference between the two.

Is there a non-pain in the ass way to do this?
 
Permissions as in if you right clicked a folder, hit properties, opened the security tab? Those permissions?

I think you can do this relatively easily with a c# app.

Are the two volumes accessible from the same machine? i.e. the program can open both volumes and compare and contrast in real time?
 
Permissions as in if you right clicked a folder, hit properties, opened the security tab? Those permissions?

I think you can do this relatively easily with a c# app.

Are the two volumes accessible from the same machine? i.e. the program can open both volumes and compare and contrast in real time?

Yes permissions as in what's listed on the security tab for every folder and sub folder.

There is an identical structure for this situation on the same machine on different driver letters.
 
Using powershell would be one easy way to do it

Run powershell in adminstrative tools.
Enable scripts
Code:
set-executionpolicy remotesigned
get drive security info and pipe it to a text file.
Code:
Dir | Get-ACL | format-list > C:\drive1.txt
Dir | Get-ACL | format-list > C:\drive2.txt
Then just compare the two files in a text editor.

If you need to do all files and folders then add -recurse like this
Code:
Dir -recurse | Get-ACL | format-list > C:\drive1.txt
 
Last edited:
Server 2003 doesn't have powershell and I'd prefer not to install on this box since it's a high production server that is fragile.
 
Any chance I could run it via Powershell from another server against this remote server even if it doesn't have it installed locally?
 
Any chance I could run it via Powershell from another server against this remote server even if it doesn't have it installed locally?

Sure . Powershell does not need to be on the target. As long as the host running powershell can see the drives that is all that matters.
 
Sure . Powershell does not need to be on the target. As long as the host running powershell can see the drives that is all that matters.

Wow that was crazy easy.

Thanks a lot!

I just opened both outputs in WinMerge and it quickly identified the differences for me.
 
Yea, powershell answered one of my biggest complaints about windows.

Now if they would just develop a better 'terminal' application for powershell to run in.....
 
Back
Top