Show file rights with PowerShell

The user or administrator can quickly lose track of extensive file and directory rights . PowerShell offers the command to get an overview of the current file rights


which we would like to explain to you here today. For example , if you want to search a directory that also contains a subordinate folder structure for specific directory rights, the following command will help you.

Get-Acl * .docx

It is easiest if you stand with the PowerShell console directly in the directory from which you want to access the directory rights. Like here in this example below:

Get-Acl list

Of course, instead of the “* .docx” placeholder, which in this case only processes the Word documents, you can also use any other placeholder.

  • *. * for all files
  • * .tmp for all files that end with the extension “.tmp”.
  • abc *. * for all files that start with ABC.
  • etc.

It is also possible to specify the path name before the placeholder. This would look like this.

Get-Acl c: *. Docx

However, if there is a space in the folder name, you have to check this . So this is:

Get-Acl ‘c: Program Files *. *’

However, the list shown above is a bit ugly because the value ” Access ” is only partially shown. If you want to get a complete list with all data, you have to issue the following PowerShell command for the file permissions .

Get-Acl *. * | Fl

| Fl ” means ” Format List ” so that the list is displayed in formatted output . Below we have shown you the result of this PowerShell query.

Get-Acl detailed listing

The decisive factor here is the parameter ” | fl “, which turns the tabular view into a list. However, this list now includes fields that we don’t really want to see, because we only want to concentrate on the Path, Owner, Group and Access columns . We can modify the ” Get-Acl ” command so that we only get these errors.

Get-Acl *. * | Select path, owner, group, access | fl

Then the output looks like this:

Get-Acl list with Owser, Group and Acccess

This is exactly the file permission list we were looking for. However, Get-Acl is not able to work recursively , which means that additional parameters have to be added so that the command goes recursively through all subdirectories and also lists these authorizations.

The command is then:

get-childitem *. * -recurse | get-acl | fl

You can also find other useful PowerShell commands in these articles:

– Read WindowsUpdate.log on Windows 10 or reformat using PowerShell – Install
Windows roles and features using PowerShell – Read
computer system information
using PowerShell
– Query Exchange quotas (Quota) settings using PowerShell – Prepare the Windows client for remote PowerShell commands with WINRM
– Edit local users and groups with
– Determine Windows system runtime using PowerShell – Create Windows 10 system restore point using PowerShell

Shut down and restart Windows using PowerShell commands – Repair Windows component stores using DISM and PowerShell commands
– UAC (user account control ) using PowerShell or turn off the registry in Windows 10
– PowerShell command to deactivate the firewall