Users (Owners)
dir /q <file>
Owner
forfiles /S /M "*.*" /C "cmd /c whoami /fo owner %p"
Recursive
icacls "C:\Windows\System32\cmd.exe"
Includes owner
Get-Acl
Owner is part of the ACL
Get-Acl <Path> | Select-Object -ExpandProperty Owner
Gets the owner of the file or directory at the specified path.
Recursive:
Specific directory:
Last updated
Was this helpful?