Hello - I'm trying to dump out directories and owners for my helpdesk.
I found this script:
PS C:\> get-childitem \\server\c$\work –recurse | get-acl |
group | export-csv c:\ACL.csv
from this site:http://www.microsoft.com/technet/scriptcenter/csc/tips/ps/acl.mspx
That's great, but I don't really need it to recurse the entire structure. All they want is the top two folder layers. Is there something equivalent to linux's --max-depth? I also only need directories, not all objects, and really just want the folder owners, not the whole acl. If someone can assist with those additional items that would be great. I've only just looked at powershell for the first time today, so this is a learning process!
I'm running this on XP SP2, but the target will be Win2K and 2003 file servers.