Last active
August 29, 2015 14:13
-
-
Save xoner/7e6d6311a779a919e9e4 to your computer and use it in GitHub Desktop.
Recursively looks for files owned by a specified user in a folder and exports them to a csv (excel) spreadsheet.
This file contains 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
Get-ChildItem -Force -Recurse -File | | |
Select *,@{n='Owner';e={(Get-Acl -LiteralPath $_.FullName).Owner}} | | |
Where {$_.Owner -eq 'DOMAINNAME\username'} | Select FullName, Owner, Length | | |
Export-Csv Files-User.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment