Monday , January 23 2017

Copy Active Directory Group members to new group

Migrating Members from Old group to New group in Active directory

image

image

Group Attribute Editor – Collect DistinguishedName Value for Old and New Group

image

Open PowerShell in Directory Server

Import-Module Activedirectory

$oldgroup = Get-ADGroup "CN=OLD_Group,OU=02 Groups,DC=Cloudid,DC=biz"
$newgroup = Get-ADGroup "CN=New_Group,OU=02 Groups,DC=Cloudid,DC=biz"

To Test – (-Whatif)

Get-ADGroupMember $oldgroup | foreach{Add-ADGroupMember $newgroup -Members $_.distinguishedName -WhatIf}

Remove –Whatif to Execute it.

image

To Execute –

Get-ADGroupMember $oldgroup | foreach{Add-ADGroupMember $newgroup -Members $_.distinguishedName}

image

You can see members migrated to new group

image

About Satheshwaran Manoharan

Satheshwaran Manoharan is an Microsoft Exchange Server MVP , Publisher of CareExchange.in Supporting/Deploying/Designing Microsoft Exchange for some years. Extensive experience on Microsoft Technologies.

Check Also

Mailbox Replication Service was unable to connect to the remote server

Office 365 Mailbox Migration Error – The migration encountered an error The Mailbox Replication Service ...

Leave a Reply

Your email address will not be published.