This will probably be just a couple lines, but I don't want to deal with it. I'll PayPal you the money on delivery of a working script.
Basically what I need is a listing of the permissions of every main directory on a given drive.
Syntax to be used:
scriptname <drive> <output file>
The script should:
1) Take the drive letter from the command line
2) Use some method ("dir /ad /b" will work, you can use whatever you want) to obtain a bare listing of all top level folders
3) use showacls to display permissions for each top level folder (showacls "<driveletter>\folder")
4) Store all output in a single filename specified from the command line (append all output using >>)
You can use an intermediate file if you want, just delete it when you're done (ie output dir results to a temp file, read line by line from the temp file, then delete the temp file).
showacls is available as part of the Windows Server 2003 Resource Kit Tools:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
A small piece of an example output (that I created manually):
w:\Admin
AIR-NOISE\Domain Users Change [RWXD]
w:\Applications
AIR-NOISE\Domain Users Change [RWXD]
w:\Call Center
AIR-NOISE\Domain Users Change [RWXD]
Viper GTS
Basically what I need is a listing of the permissions of every main directory on a given drive.
Syntax to be used:
scriptname <drive> <output file>
The script should:
1) Take the drive letter from the command line
2) Use some method ("dir /ad /b" will work, you can use whatever you want) to obtain a bare listing of all top level folders
3) use showacls to display permissions for each top level folder (showacls "<driveletter>\folder")
4) Store all output in a single filename specified from the command line (append all output using >>)
You can use an intermediate file if you want, just delete it when you're done (ie output dir results to a temp file, read line by line from the temp file, then delete the temp file).
showacls is available as part of the Windows Server 2003 Resource Kit Tools:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
A small piece of an example output (that I created manually):
w:\Admin
AIR-NOISE\Domain Users Change [RWXD]
w:\Applications
AIR-NOISE\Domain Users Change [RWXD]
w:\Call Center
AIR-NOISE\Domain Users Change [RWXD]
Viper GTS
