A short script to list explicit rights assigned to a directory structure. It uses the recursive option of ls (an Alias for Get-ChildItem) to drop down through the directory structure.

There are lots of little programs around that can do exactly the same thing, probably quite a few more efficiently than this.

The match is not case sensitive. If the value for $SecurityPrincipal is left blank the script will return all explicitly assigned rights.

1 Comment

  1. Thanks for the script.
    One improvement would be to only add entries to the ExplicitRights array when it matches the criteria. At the moment it still adds a NULL entry for every DirEntry that does not match (which also stops Export-CSV from working), which may slow down processing with thousands of files.


Leave a Reply

Your email address will not be published. Required fields are marked *