Moving Organizational Units
Moving Organizational Units
Moves the specified Organizational Unit into the given target container.
Examples:
Hint: The execution of these examples requires a connected PowerShell drive. |
Move the Organizational Unit "Porto" from the container "Managed Users & Computers" into the container "Managed Users & Computers\solys.local" using the method MoveTo():
$MyOU = Get-EmdbOrganizationalUnit "emdb:\rootDSE\Managed Users & Computers\Porto" $MyDestinationContainer = Get-EmdbOrganizationalUnit "emdb:\rootDSE\Managed Users & Computers\solys.local" $MyOU.MoveTo($MyDestinationContainer) |
Move the Organizational Unit "Porto" from the container "Managed Users & Computers" into the container "Managed Users & Computers\solys.local" using the cmdlet Move-Item:
Move-Item -Path "emdb:\rootDSE\Managed Users & Computers\Porto" -Destination "emdb:\rootDSE\Managed Users & Computers\solys.local" |