How can i add a user to a security group from EMS
In the below script i just want addd the user to a security group ? Is it possible New-Mailbox -Name 'test tkr' -Alias 'prefix00004' -OrganizationalUnit $OU -UserPrincipalName 'prefix00004@gust.local' -SamAccountName 'prefix00004' -FirstName 'test' -Initials '' -LastName 'tkr' -Password $mypassword -Database 'MDB3'
July 1st, 2012 4:52am

You need to import the AD module first with "Import-Module ActiveDirectory" and then you can use the "Add-ADGroupMember" cmdlet. See also here: http://gallery.technet.microsoft.com/scriptcenter/ffff189d-8ef1-4903-b19c-12dcd352c88e Timo
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2012 6:35am

run the following command manually after you have created the mailbox using yours Add-DistributionGroupMember -Identity "DistributionGroupName" -Member "prefix00004"if you want to create a script then add the following lines to a text file & rename the text file as .ps1New-Mailbox -Name 'test tkr' -Alias 'prefix00004' -OrganizationalUnit $OU -UserPrincipalName 'prefix00004@gust.local' -SamAccountName 'prefix00004' -FirstName 'test' -Initials '' -LastName 'tkr' -Password $mypassword -Database 'MDB3'Add-DistributionGroupMember -Identity "DistributionGroupName" -Member "prefix00004"run the PS1 script from Exchange Management Shellyou can also do more using thread belowhttp://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516/
July 1st, 2012 2:50pm

run the following command manually after you have created the mailbox using yours Add-DistributionGroupMember -Identity "DistributionGroupName" -Member "prefix00004"if you want to create a script then add the following lines to a text file & rename the text file as .ps1New-Mailbox -Name 'test tkr' -Alias 'prefix00004' -OrganizationalUnit $OU -UserPrincipalName 'prefix00004@gust.local' -SamAccountName 'prefix00004' -FirstName 'test' -Initials '' -LastName 'tkr' -Password $mypassword -Database 'MDB3'Add-DistributionGroupMember -Identity "DistributionGroupName" -Member "prefix00004"run the PS1 script from Exchange Management Shellyou can also do more using thread belowhttp://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516/
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2012 3:01pm

Security Group and "Add-DistributionGroupMember" ??
July 1st, 2012 5:09pm

On Sun, 1 Jul 2012 20:58:45 +0000, Timo Geuken wrote: >Security Group and "Add-DistributionGroupMember" ?? Sure, as long as it's mail-enabled. :-) --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2012 6:59pm

I am getting the following error I am an enterprise admin [PS] C:\Windows\system32>Add-DistributionGroupMember -Identity "Staff" -Member "prefix0008@test.local" You don't have sufficient permissions. This operation can only be performed by a manager of the group. + CategoryInfo : NotSpecified: (:) [Add-DistributionGroupMember], OperationRequiresGroupManagerException + FullyQualifiedErrorId : 98F070CA,Microsoft.Exchange.Management.RecipientTasks.AddDistributionGroupMember
July 2nd, 2012 3:54am

I am an enterprise admin [PS] C:\Windows\system32>Add-DistributionGroupMember -Identity "Staff" -Member "prefix0008@test.local" You don't have sufficient permissions. This operation can only be performed by a manager of the group. Hi supportsib, Please check whether you are a member of Organization Management or Recipient Management group(ADUC->domain.com->Microsoft Exchange Security Groups) Add-DistributionGroupMember http://technet.microsoft.com/en-us/library/bb124340.aspxFrank Wang TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2012 10:57pm

I am an enterprise admin [PS] C:\Windows\system32>Add-DistributionGroupMember -Identity "Staff" -Member "prefix0008@test.local" You don't have sufficient permissions. This operation can only be performed by a manager of the group. Hi supportsib, Please check whether you are a member of Organization Management or Recipient Management group(ADUC->domain.com->Microsoft Exchange Security Groups) Add-DistributionGroupMember http://technet.microsoft.com/en-us/library/bb124340.aspxFrank Wang TechNet Community Support
July 2nd, 2012 11:00pm

Hi supportsib, Any updates?Frank Wang TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2012 10:00pm

i tried to add using an enterprise admin account , in that case it will work if i add the user under organization managment or receipient management .By the way the the user is a member of receipient management
July 9th, 2012 2:20am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics