Course Overview

/

Permissions

Permissions

Checking Permissions

Checking permissions on files and directories allows us as users to what work out what we can and can't have access to. To view the owners and level of access we may have within a directory or on a file, use the "Get-Acl" cmdlet, like the below use case:

  • Get-Acl .\test.txt

As you can see from the screenshot the Owner is listed in the middle column, pointing to the user "Consultant" in this case and on the far right hand side Access is "NT AUTHORITY\SYSTEM Allow FullControl…".

Filtering The Owner

If we are only concerned with seeing the owner of the file or directory we can always filter the output by using the pipe "|" , along with the select parameter, see below for an example:

  • Get-Acl NGSPowershell | select "owner"