Moving Static Groups

Moves the specified Static Group object into the given target container.


Examples:


Hint:  The execution of these examples requires a connected PowerShell drive.


Move the Static User Group"Admins" from the container "Managed Users & Computers\solys.local\Chicago\ITService\Users" into the container "Managed Users & Computers\solys.local\Chicago\ITGlobal\Users" using the method MoveTo():


$MyGroup = Get-EmdbGroup "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Users\Admins"

$MyDestinationContainer = Get-EmdbOrganizationalUnit "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITGlobal\Users"

$MyGroup.MoveTo($MyDestinationContainer)


Move the Static User Group"Admins" from the container "Managed Users & Computers\solys.local\Chicago\ITService\Users" into the container "Managed Users & Computers\solys.local\Chicago\ITGlobal\Users" using the cmdlet Move-Item:


Move-Item -Path "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Users\Admins" -Destination "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITGlobal\Users"