If you’ve followed the instructions for creating shared mailboxes using PowerShell you know its a little clugey. However, since the parameters for setting one up is fairly consistent except for the name and who has access to it, I’ve created the following script that can be used to create them.
You must have the following components installed in order to run it.
· PowerShell
· Exchange 2007 Management Console and Shell
· Quest ActiveRoles snap-in for Powershell (free download here)
· PowerShell must be run in the context of a user account that has rights to create new objects in AD
· You must set your PowerShell execution policy to Unrestricted (open PowerShell, type Set-ExecutionPolicy Unrestricted)
When you run the script from within PowerShell, it will perform the following:
1. Check to make sure the Exchange & Quest Snap-ins are present and if not, add them
2. Query the user for information about the new shared mailbox (name of the mailbox, etc).
3. Based on the information provided, it will create the new mailbox in one of two OUs (Site1 or Site2)
4. It will then create a new security group in AD with a MBX_ prefix and grant members of this group Full Access and Send-As rights to the new mailbox
5. Log all of this in a log file found in the same folder as the script for troubleshooting purposes.
Once the script completes and creates the mailbox and security group, all you have to do to complete the process is use AD Users & Computers to add user accounts to the new security group to grant them access.
Continue reading "Script to create Shared Mailboxes consistently" »