Script repository

Disable all computers managed by a user

Updated on: Jan 18, 2026, Views: 3427

Computers

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.

    Got questions?

    Support Questions & Answers

    We use cookies to improve your experience.
    By your continued use of this site you accept such use.
    For more details please see our privacy policy and cookies policy.