locked
How to run the the impersonation permission grant command for multiple users RRS feed

  • Question

  • I have run below command earlier to grant the impersonation for a user called user1

     

    get-mailbox -identity user1 | add-adpermission -user domainname\service application user -ExtendedRights ms-Exch-EPI-May-Impersonate

     

    Now I want to run this command for multiple users like user2, user3, user 4 together. How should I run the command.

     

    This is for Exchange Server 2007 SP2

     

     


    Abhijeet M. Mohite
    Wednesday, September 7, 2011 7:55 AM

Answers

  • Put the users into a csv file then run import-csv and pipe that into the command. Create CSV file like below:

    column1

    user

    jdoe

    jsmith

    [PS] C:\temp>import-csv jmigration.txt | foreach-object{get-mailbox -identity $_.user | add-adpermission -user domain\serviceaccount -ExtendedRights ms-Exch-EPI-May-Impersonate}


    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
    Wednesday, September 7, 2011 2:22 PM
  • Short comment: For an CRM application we tested impersonation by adding some 60 users to a security group. This did not work and ended up with the same method James describes.
    MCTS: Messaging | MCSE: S+M
    • Marked as answer by emma.yoyo Thursday, September 8, 2011 7:33 AM
    Wednesday, September 7, 2011 8:49 PM

All replies

  • Put the users into a csv file then run import-csv and pipe that into the command. Create CSV file like below:

    column1

    user

    jdoe

    jsmith

    [PS] C:\temp>import-csv jmigration.txt | foreach-object{get-mailbox -identity $_.user | add-adpermission -user domain\serviceaccount -ExtendedRights ms-Exch-EPI-May-Impersonate}


    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
    Wednesday, September 7, 2011 2:22 PM
  • Short comment: For an CRM application we tested impersonation by adding some 60 users to a security group. This did not work and ended up with the same method James describes.
    MCTS: Messaging | MCSE: S+M
    • Marked as answer by emma.yoyo Thursday, September 8, 2011 7:33 AM
    Wednesday, September 7, 2011 8:49 PM
  • Hi Abhijeet

    get-mailbox -identity user1 | add-adpermission -user domainname\service application user -ExtendedRights ms-Exch-EPI-May-Impersonate

    I am little bit confused with this command so can you please help me what to right inplace of User1 and domainname\service application user

    Example: I wanted to give Impersonate rights to IT.Service@xyz.com then can you please complete command for me.      Thanks in advance.


    Warm Regards, Pramod Kumar Singh Manager-IT

    Tuesday, April 29, 2014 10:34 AM