答案 0 :(得分:1)
要在屏幕截图上自动显示该按钮,请输入代码from there:
Function Set-Inheritance {
param($ObjectPath)
$ACL = Get-ACL -path "AD:\$ObjectPath"
If( $acl.AreAccessRulesProtected ){
$ACL.SetAccessRuleProtection( $False, $True )
Set-ACL -AclObject $ACL -path "AD:\$ObjectPath"
Write-Host "MODIFIED "$ObjectPath
} #End IF
} #End Function Set-Inheritance