Moving Computers
Moving Computers
Moves the specified Computer object into the given target container.
Examples:
Hint: The execution of these examples requires a connected PowerShell drive. |
Move the Computer named "XP01" from the container "Managed Users & Computers\solys.local\Chicago\ITService\Workstations" into the container "Managed Users & Computers\solys.local\Chicago\ITGlobal\Workstations" using the method MoveTo():
$MyComputer = Get-EmdbComputer "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Workstations\XP01" $MyDestinationContainer = Get-EmdbOrganizationalUnit "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITGlobal\Workstations" $MyComputer.MoveTo($MyDestinationContainer) |
Move the Computer named "XP01" from the container "Managed Users & Computers\solys.local\Chicago\ITService\Workstations" into the container "Managed Users & Computers\solys.local\Chicago\ITGlobal\Workstations" using the cmdlet Move-Item:
Move-Item -Path "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Workstations\XP01" -Destination "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITGlobal\Workstations" |