Script repository
The script disables all the computers managed by the target user. To execute the script, create a business rule, custom command or scheduled task configured for the User object type.
To use the script, install the Adaxes PowerShell module on the computer where the service runs.
Import-Module Adaxes
$computers = Get-AdmComputer -LdapFilter "(managedBy=%distinguishedName%)"
if ($computers -eq $NULL)
{
return
}
$computers | Disable-AdmAccount
Comments 0
You must be signed in to comment.