Skip to content

Instantly share code, notes, and snippets.

@FrankSpierings
Created April 10, 2017 13:29
Show Gist options
  • Save FrankSpierings/d32e0c71c71c3d5a19ba60c5ae990072 to your computer and use it in GitHub Desktop.
Save FrankSpierings/d32e0c71c71c3d5a19ba60c5ae990072 to your computer and use it in GitHub Desktop.
# https://gallery.technet.microsoft.com/scriptcenter/PowerShellAccessControl-d3be7b83#
Import-Module PowerShellAccessControl
# Find files/dirs recursive | grab their ACL | Special effective perms module, grab all rights for our user | select only objects with write perms | show the path to the object
gci -Recurse c:\ | Get-Acl | Get-EffectiveAccess -ListAllRights -Principal $Env:USERNAME |? {($_.Permission -eq 'Write')} |% {$_.DisplayName}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment