你好,
非常感谢你的提问。
你可以尝试使用以下powershell命令来设置文件夹所有者。
$ACL = Get-ACL "FolderPath"
$Group = New-Object System.Security.Principal.NTAccount("NT SERVICE", "TrustedInstaller")
$ACL.SetOwner($Group)
Set-Acl -Path "FolderPath" -AclObject $ACL
此外,你可以尝试通过以下链接博客中的set-owner function来设置文件夹所有者。
https://learn-powershell.net/2014/06/24/changing-ownership-of-file-or-folder-using-powershell/
最好的祝福,
Lee
针对Windows
2008/2008R2的扩展支持将于2020年结束,之后微软将不再为其提供安全更新。点击此处或扫描二维码获取《在 Azure 上运行 Windows
Server 的终极指南》,把握良机完成云迁移并实现业务现代化。
