Last active
May 2, 2018 17:33
-
-
Save gdlmx/5345de2db573476ec60e258d697876e0 to your computer and use it in GitHub Desktop.
Powershell recipes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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