We help IT Professionals succeed at work.

Set one user as Owner for 500 security Groups

Kamalasekar Parthasarathy
on

Dear Team.

I have to set one user as a additional owner for 500 groups and these 500 Security groups are in Particular OU called "Sales".

Please let me know how to set this by using exchange management shell. I have to set only for user as a owner for all the 500 groups.
Comment
Watch Question

Consultant
Commented:
Try this:-


Get-DistributionGroup -OrganizationalUnit 'OUNAME' | Set-DistributionGroup -ManagedBy 'User Name'
Kamalasekar ParthasarathyMessaging Support

Author

Commented:

I got the below error message When i run the above command.. Kindly advice.
____________________________________________________________________
You don't have sufficient permissions. This operation can only be performed by a manager of the group.
    + CategoryInfo          : NotSpecified: (:) [Set-DistributionGroup], OperationRequiresGroupManagerException
    + FullyQualifiedErrorId : 9832210E,Microsoft.Exchange.Management.RecipientTasks.SetDistributionGroup
Madan SharmaConsultant

Commented:
It seems that your user doesn't have appropriate permissions to run this command. Check the following link how to assign permissions to user to managing Distribution Groups

http://sysadmin-talk.org/2010/06/omg-allowing-end-users-to-manage-distribution-group-membership-in-exchange-2010-2/

or user Administrator to run this command.
Kamalasekar ParthasarathyMessaging Support

Author

Commented:

I have done steps which given in the above link.. but still says the same error message and unable to run the below command.

Get-DistributionGroup -OrganizationalUnit 'OUNAME' | Set-DistributionGroup -ManagedBy 'User Name'
Madan SharmaConsultant

Commented:
did you try to run this CMDLET under Administrator account if not please try. I believe there must be some  permission issue with your current users.
Kamalasekar ParthasarathyMessaging Support

Author

Commented:
Hi...

I was able to run this command by using -BypassSecurityGroupManagerCheck . But if i run this command, it will remove all the old managed by and it will set the new one. i want to add as Additional managedby or Primary but it should not remove the Existing names under managedby for all the DLs.

Get-DistributionGroup -OrganizationalUnit 'OUNAME' | Set-DistributionGroup -BypasssecurityGroupManagercheck -ManagedBy 'User Name'

Also, Please let me know, how to export the list of Managed by details for the UniversalSecurityGroups

Thank you...