From a strategic point of view Get-Acl (Access Control List) is a stepping-stone to changing
permissions with Set-Acl. When learning about Get-Acl select a file
rather than a folder, those SID numbers can be so meaningless.
Note 1: The reason that I used the variable
$Files is that I want to remind you to change the value for the path before
running this script on your machine.
Note 2: -memberType *Property filters out methods and
shows just the various
properties. For example PSChildName may be better than PSPath.
Note 3: Actually, any file will do to check the properties
supported by Get-Acl.
Guy
Recommends: Permissions Analyzer - Free Active Directory Tool
I like the
Permissions Monitor because it enables me to see quickly WHO has permissions
to do WHAT. When you launch this tool it analyzes a users effective NTFS
permissions for a specific file or folder, takes into account network share
access, then displays the results in a nifty desktop dashboard!
Think of all the frustration that this free utility saves when you are
troubleshooting authorization problems for users access to a resource.
Note 4: I recommend that you change
'Administrator' to the name of users on your computer.
Furthermore, I you take my advice then you may wish to change the value
of $Files to "C:\Windows\Users\"
Note 5: Pure PowerShell syntax include ` backtick for
word-wrap (|) for piping and -auto to concentrate the columns.
Background Research
In addition to pure PowerShell Get-Acl research I strongly recommend
that open Windows Explorer and look at not only the location of the
files, but also at the permissions.
If you right-click any file or folder, select properties and check the
permissions. For further detail click Edit, see screenshot to the right.
Checking the help file will reveal useful parameters, for instance the
-audit switch maybe useful for your task. In addition to the file
system you can also use Get-Acl to list permissions on registry keys.
Please email me if you have a example scripts. Also please report any factual mistakes, grammatical errors or broken links, I will be happy to correct the fault.
Windows Management Instrumentation (WMI) is one of the hidden
treasures of Microsoft operating systems.
Fortunately, Solarwinds
have created the
Free WMI Monitor so that you can actually see and understand these gems of
performance information. Take the guess work out of which
WMI counters to use for applications like Microsoft Active Directory,
SQL or Exchange Server.