Skip to content

Instantly share code, notes, and snippets.

@gdlmx
Last active May 2, 2018 17:33
Show Gist options
  • Save gdlmx/5345de2db573476ec60e258d697876e0 to your computer and use it in GitHub Desktop.
Save gdlmx/5345de2db573476ec60e258d697876e0 to your computer and use it in GitHub Desktop.
Powershell recipes
Param(
[string]$containerPath,
[string]$OwnerName
)
gci -recurse $containerPath | ? { $_.PSIsContainer -eq $False } | ? { (Get-ACL -LiteralPath $_.FullName).Owner -ne $OwnerName }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment