PowerShell - Display file or directory permissions using the Get-Acl cmdlet

by
Jeremy Canfield |
Updated: June 14 2023
| PowerShell articles
The Get-Acl cmdlet can be used to display the ownership and permissions of files and directories. In this example, the ownership and permissions of foo.txt is displayed.
Get-Acl C:\Users\johndoe\foo.txt
Which should return something like this.
Path Owner Access
---- ----- ------
foo.txt APPL\johndoe NT AUTHORITY\SYSTEM Allow FullControl..
Since the full output is not displayed, this cmdlet is often piped through Format-List.
Get-Acl C:\Users\johndoe\foo.txt | Format-List
Which should return something like this.
Path : Microsoft.PowerShell.Core\FileSystem::C:\Users\johndoe\foo.txt
Owner : APPL\johndoe
Group : APPL\Domain Users
Access : NT AUTHORITY\SYSTEM Allow FullControl
BUILTIN\Administrators Allow FullControl
APPL\johndoe Allow FullControl
Audit :
Sddl : O:S-1-5-21-2935017146-1175072803-3606478167-175590G:DUD:(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-2935017146-1175072803-3606478167-175590)
Did you find this article helpful?
If so, consider buying me a coffee over at