Renaming Active Directory Groups

Renames the specified Active Directory Group object.


Examples:


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


Rename the External Group "Domain-Users" in the context "solys.local" to the new name "Domain-Admins" through setting the name property and a subsequent call to the method Update():


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

$MyGroup.Name = "Domain-Admins"

$MyGroup.Update()


Rename the External Group "Domain-Admins" to the new name "Domain-Users" using the cmdlet Rename-Item:


Cd "emdb:\rootDSE\Managed Users & Computers\solys.local"

Rename-Item -Path "Domain-Admins" -NewName "Domain-Users"


Hint: In general, we dissuade from renaming imported Active Directory objects, because it is more difficult then to associate the imported group with its AD counterpart by name. For instance if you imagine a group "Domain-Users" that you rename to "Domain-Admins" after importing. Now it is not unlikely to accidentally assign a Software Package to this group, that is intended for administrators only, but is now distributed to all users of the domain instead.