Quest Active Directory command for moving Disabled Objects

Tedjith David 0 Reputation points
2023-02-07T13:47:14.1566667+00:00

Hi,
I want a Quest Active Directory command for moving Disabled computers from one OU to Another.

$SourceOU = "OU=IG Workstations W10,DC=igi,DC=ig,DC=local"

$TargetOU = "OU=Disabled Computers,OU=Disabled Objects,DC=igi,DC=ig,DC=local"

I would like the script to query for Disabled computers in Source OU and move Disabled Objects to Target OU

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,117 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,847 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,362 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 44,776 Reputation points
    2023-02-07T15:43:28.37+00:00

    Why not use the PowerShell cmdlets (Get-ADComputer and Move-ADObject)?

    To get the disabled AD computer objects using the Quest module, use this:

    Get-QADComputer -ldapFilter '(userAccountControl:1.2.840.113556.1.4.803:=2)'
    
    0 comments No comments