Search This Blog

Friday, August 5, 2011

Appending members to Existing Group’s Membership

Hi All,

I got a request from my old good friend. He has contacts which are member of various groups and now this contact’s group membership needs to be added to another Group membership.  There are about 40k contacts how to do this using powershell script and without overwriting the group’s existing membership. So here how we did it.
I used questad cmdlets with powershell.

Get-QadObject -identity Contact | Get-QADMemberOf | Add-QADGroupMember -identity Group

With the help of Quest the code has been made really really short. Although the same could have been done using pure powershell but it would require some grey matter which is in short :)

No comments:

Post a Comment