locked
Access to multiple mailboxes via Powershell RRS feed

  • Question

  • Hi

    I have an application account, domain\App1, that needs to have full mailbox access to about 300 mailboxes. We have the list of mailboxes in a CSV file, but does anyone know a Powershell command we can use that will automatically script this access? My PS isn't that great :(

    Saturday, May 14, 2011 1:57 PM

Answers

  • Use Import-CSV and run a loop for each entry in which you apply the rights.  The format will be something like this:

    $Mailboxes = Import-CSV ...

    ForEach ($Mailbox In $Mailboxes) {

        Add-ADPermission -Identity $Mailbox.Identity ...

    }

    The rest is left as an exercise for the reader.


    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
    • Proposed as answer by Jamestechman Saturday, May 14, 2011 6:25 PM
    • Marked as answer by Sophia Xu Thursday, May 19, 2011 9:21 AM
    Saturday, May 14, 2011 4:11 PM

All replies

  • It depends on what you need to do with the 300 mailboxes.

    Saturday, May 14, 2011 4:10 PM
  • Use Import-CSV and run a loop for each entry in which you apply the rights.  The format will be something like this:

    $Mailboxes = Import-CSV ...

    ForEach ($Mailbox In $Mailboxes) {

        Add-ADPermission -Identity $Mailbox.Identity ...

    }

    The rest is left as an exercise for the reader.


    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
    • Proposed as answer by Jamestechman Saturday, May 14, 2011 6:25 PM
    • Marked as answer by Sophia Xu Thursday, May 19, 2011 9:21 AM
    Saturday, May 14, 2011 4:11 PM