"文件列表和子文件夹所有者信息"使用powershell脚本

时间:2016-08-04 20:12:09

标签: powershell windows-7 server

我可以在此链接中看到一些" https://community.spiceworks.com/scripts/show/1722-get-fileowner"

我试过但是这些例子都没有给我效用。

1 个答案:

答案 0 :(得分:0)

这样做

get-childitem c:\users\usera\documents -Recurse | foreach{
    $f = $_.FullName
    $o = Get-Acl $f | Select -ExpandProperty Owner
    Write-Output "$f is owned by $o"
}
相关问题