Moving the Objects in an OU to a Different OU

Applies To: Windows Server 2008 R2

This topic explains how to use the Active Directory module for Windows PowerShell to move objects in an organizational unit (OU) to a different OU.


The following example demonstrates how to move the objects in the OU ManagedGroups to the OU Managed in the domain:

Get-ADObject -Filter 'Name -like "*"' -Searchbase 'OU=ManagedGroups,DC=Fabrikam,DC=com' -SearchScope OneLevel | Move-ADObject -TargetPath "OU=Managed,DC=Fabrikam,DC=com"

Additional information

For a full explanation of the parameters that you can pass to Get-ADObject or Move-ADObject, at the Active Directory module command prompt, type Get-Help Get-ADObject –detailed or Get-Help Move-ADObject, and then press ENTER.