Import-Module ActiveDirectory
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
#Find user with AdminCount set to 1
$users = get-aduser -SearchBase «OU=Managed Users,DC=Contoso,DC=com» -Filter {AdminCount -eq 1}
#Enable inheritance flag for each user
$users | foreach {Set-Inheritance $_.distinguishedname}
Взято от сюда: http://blogs.msdn.com/b….ts.aspx