none
How can i add a user to a security group from EMS

    Întrebare

  • 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'

    1 iulie 2012 08:41

Răspunsuri

  • 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 .ps1

    New-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 Shell

    you can also do more using thread below

    http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516/

    • Marcat ca răspuns de Frank.Wang 6 iulie 2012 02:01
    1 iulie 2012 18:50
  • 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.aspx


    Frank Wang

    TechNet Community Support

    • Marcat ca răspuns de Frank.Wang 6 iulie 2012 02:01
    3 iulie 2012 02:57

Toate mesajele

  • 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

    1 iulie 2012 10:24
  • 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 .ps1

    New-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 Shell

    you can also do more using thread below

    http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516/

    • Marcat ca răspuns de Frank.Wang 6 iulie 2012 02:01
    1 iulie 2012 18:50
  • Security Group and "Add-DistributionGroupMember" ??

    1 iulie 2012 20:58
  • 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
    1 iulie 2012 22:48
  • 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

    2 iulie 2012 07:43
  • 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.aspx


    Frank Wang

    TechNet Community Support

    • Marcat ca răspuns de Frank.Wang 6 iulie 2012 02:01
    3 iulie 2012 02:57
  • Hi supportsib,

    Any updates?


    Frank Wang

    TechNet Community Support

    5 iulie 2012 01:57
  • 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
    9 iulie 2012 06:06