Moving disable user objects in Active Directory using PowerShell and Quest Management cmdlets. Moving all disabled users in the ‘/Users’ OU to the ‘/Users/Disabled’ OU.

1
2
3
4
5
6
Add-PSSnapin -Name Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
$Users = Get-QADUser -SearchRoot 'ad.domain.com/Users/' -Disabled
Write-Host 'Moving $Users.Count Users."
ForEach($User In $Users){
Move-QADObject $User.DN -NewParentContainer '
ad.domain.com/Users/Disabled'
}

Hope this helps

All information is provided on an AS-IS basis, with no warranties and confers no rights.