PowerShell Logo Small

Move-ADObject



This is the built-in help made by Microsoft for the command 'Move-ADObject', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Moves an Active Directory object or a container of objects to a different container or domain.

SYNTAX


Move-ADObject [-Identity] <ADObject> [-TargetPath] <String> [-AuthType <ADAuthType>] [-Credential <PSCredential>] [-Partition <String>]
[-PassThru [<SwitchParameter>]] [-Server <String>] [-TargetServer <String>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Move-ADObject cmdlet moves an object or a container of objects from one container to another or from one domain to another.


The Identity parameter specifies the Active Directory object or container to move. You can identify an object or container by its
distinguished name (DN) or GUID. You can also set the Identity parameter to an object variable such as $<localObject>, or you can pass an
object through the pipeline to the Identity parameter. For example, you can use the Get-ADObject cmdlet to retrieve an object and then pass
the object through the pipeline to the Move-ADObject cmdlet. You can also use the Get-ADGroup, Get-ADUser, Get-ADComputer,
Get-ADServiceAccount, Get-ADOrganizationalUnit and Get-ADFineGrainedPasswordPolicy cmdlets to get an object that you can pass through the
pipeline to this cmdlet.


The TargetPath parameter must be specified. This parameter identifies the new location for the object or container.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=219320
Get-ADObject
New-ADObject
Remove-ADObject
Rename-ADObject
Restore-ADObject
Set-ADObject

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

C:\PS>Move-ADObject -Identity "OU=ManagedGroups,DC=Fabrikam,DC=Com" -TargetPath "OU=Managed,DC=Fabrikam,DC=Com"



Description

-----------

Moves the Organizational Unit 'ManagedGroups' to a new location. The OU 'ManagedGroups' must NOT be protected from accidental deletion for the
successful move.




-------------------------- EXAMPLE 2 --------------------------

C:\PS>Move-ADObject "8d0bcc44-c826-4dd8-af5c-2c69960fbd47" -TargetPath "OU=Managed,DC=Fabrikam,DC=Com"



Description

-----------

Moves the object identified by the specified GUID to the new location.




-------------------------- EXAMPLE 3 --------------------------

C:\PS>Move-ADObject "8d0bcc44-c826-4dd8-af5c-2c69960fbd47" -TargetPath "1c2ea8a8-c2b7-4a87-8190-0e8a166aee16"



Description

-----------

Moves an object to a new location. Both the object and the target path are specified using GUIDs.




-------------------------- EXAMPLE 4 --------------------------

C:\PS>Move-ADObject -Identity "CN=Peter Bankov,OU=Accounting,DC=Fabrikam,DC=com" -TargetPath "OU=Accounting,DC=Europe,DC=Fabrikam,DC=com"
-TargetServer "server01.europe.fabrikam.com"



Description

-----------

Moves an object with DistinguishedName 'CN=Peter Bankov,OU=Accounting,DC=Fabrikam,DC=com' to a different domain.




-------------------------- EXAMPLE 5 --------------------------

C:\PS>Move-ADObject -Identity "CN=AccountLeads,DC=AppNC" -TargetPath "OU=AccountDeptOU,DC=AppNC" -server "FABRIKAM-SRV1:60000"



Description

-----------

Moves an object to a new location within an LDS instance.