Taking on PowerShell one cmdlet at a time

Share this post: This is part of an ongoing blog series by Adam Gordon. Adam will walk through each PowerShell command every week, explaining when and how to use them. Adam will be covering Get-Acl.

When to use Get Acl
You need the security descriptor to access a resource such as a file, registry key, or file.
How to Use Get-Acl
Find the security descriptor for a specific directory or file
FL
This command retrieves the security descriptor for the directory “C:Windows”, and outputs a formatted list using the FL alias.

Find the security descriptor for a specific registry key or subkey
Get-Acl -Path HKLM:\System\CurrentControlSet\Control | Format-List
This command uses the Get-Acl cmdlet to get the security descriptor of the Control subkey (HKLM\SYSTEM\CurrentControlSet\Control) of the registry.
The Path parameter is used to specify the Control subkey. ) passes the security descriptor that Get-Acl gets to the Format-List command, which formats the properties of the security descriptor as a list so that they are easy to read.

Do you need PowerShell training? ITProTV offers PowerShell online IT training courses.