A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

Retrieve File Permissions using Get-Acl with PowerShell

Retrieving the owner and permissions of a file, folders and even registry keys is a breeze with PowerShell’s Get-Acl cmdlet. Let’s try checking to see who has access to to the C:\Documents and Settings\Administrator folder.

Get-Acl "C:\Documents and Settings\Administrator"

Now this return everything that I would expect it to, but I prefer the Format-List view, so let’s check the permissions on the the file C:\Windows\clock.avi and output it in a list view.

Get-Acl "C:\Windows\clock.avi" | Format-List

Ok, now I did say we could check the permissions of a registry key, so let’s go for it…

Get-Acl HKLM:\Software\Microsoft

Now if you just want to find out the owner of the file you could pull back just that value

Get-Acl "C:\Windows\clock.avi" | Select Owner

Leave a Reply