Move an object to a new OU.
Syntax Move-QADObject [-Identity] IdentityParameter -NewParentContainer IdentityParameter [-Control hashtable] Advanced_Options [-Confirm] [-WhatIf] [CommonParameters] Key -identity The Distinguished Name (DN), Canonical Name, GUID or, where applicable, the Domain\Name, UPN or SID of the user object you wish to disable. -ConnectionAccount
The user logon name of the account with which to connect, in the form
DomainName\UserName, or in the form of a user principal name. -NewParentContainer
The Distinguished Name of the destination container The container the object will be moved to. -WhatIf Describe what would happen if you executed the command, without actually executing the command. -Confirm Prompt for confirmation before executing the command. Advanced_Options: [-UseGlobalCatalog] [-Proxy] [-Service String] [-ConnectionAccount String] [-ConnectionPassword SecureString] [-Credential PSCredential] [-Connection ArsConnection]
Use this cmdlet to move an object between containers within an Active Directory domain (the cmdlet cannot move an object to a different domain). An object to move can be specified by DN, SID, GUID, UPN or Domain\Name, or it can be located by using a Get- cmdlet and then piped into the Move- cmdlet. The destination container can be specified by DN or GUID.
Move the PC called 'newpc' (in domain SS64Dom) to the same OU as that where the PC 'oldpc' currently resides. This is handy when replacing one PC with another.
PS C:> move-qadobject -identity 'SS64dom\newpc' –newparentcontainer (get-qadcomputer 'SS64Dom\oldpc$').parentcontainer
“A bank is a place where they lend you an umbrella in fair weather and ask for it back when it begins to rain” ~ Robert Frost
Get-QADComputer - Retrieve computer objects that match specified conditions
© Copyright SS64.com 1999-2013
Some rights reserved