我需要修改資料夾中的「經過身份驗證的使用者」群組並將其置於完全控制之下。
我嘗試了 powershell 腳本,但它無法大量工作,可以幫助我嗎?
這是批次:
icacls c:\TEST /grant *S-1-5-11:(f)
和電源外殼:
$FolderPath = "C:\Program Files\Eliot"
$ACL = Get-Acl -Path $FolderPath
$SID = New-Object System.Security.Principal.SecurityIdentifier("S-1-5-11")
$Rule = new-object System.Security.AccessControl.FileSystemAccessRule($SID.Value, "FullControl",”ContainerInherit,ObjectInherit”,”None”,”Allow”)
$ACL.SetAccessRule($Rule)
Set-Acl -Path $FolderPath -AclObject $ACL