Chat with us, powered by LiveChat

Blog

Back

Easily Create Office 365 Shared Mailboxes

18 Sep 2012 by Emma Robinson

It can often be quite frustrating and difficult to do even the most simple of tasks in Office 365 – tasks like creating a Shared Mailbox. To try and make this process a little easier for the average person, I’ve put together a little PowerShell script to help you easily create a Shared Mailbox on Office 365.
Here is a step by step guide on how to use the script:
1. Download the Office 365 Shared Mailbox Creation Script from the Microsoft Scripting Centre and Save it to your desktop
2. Open PowerShell from the Start Menu

Powershell in Start Menu

Powershell in Start Menu


3. Type cd Desktop and press Enter.
Then Type .\New-SharedMailbox.ps1 and press Enter.
It should look something like this.

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS C:\Users\alan> cd .\Desktop
PS C:\Users\alan\Desktop> .\New-SharedMailbox.ps1

If you get an error saying something like:
File New-SharedMailbox.ps1 cannot be loaded because the execution of scripts is disabled on this system.
Then Follow these Instructions. Once you’ve done this, start again at the start of this list of steps.
4. Now that the script is off and running, you start by typing in your Office 365 Administrator Username and Password

Enter your Office 365 Administrator Credentials


5. You will now be asked a series of questions about the new Shared Mailbox we are going to create. They will be as follows:
Enter a username for the new Shared mailbox (e.g. shared@yourdomain.com):
Type the username of the new mailbox you want to create. This will become it’s email address as well. Make sure you don’t put any spaces in and type your domain correctly. Once you’ve typed it in press Enter.
Enter a friendly name for the new Shared mailbox (e.g. My Shared Mailbox):
Type the Display Name of the new mailbox. This is what you will see in the Address Book and in Outlook. You’re allowed to put spaces in this one. Once you’ve typed it in press Enter.
It will look like this

PS C:\Users\alan\Desktop> .\New-SharedMailbox.ps1
This script will create a new shared mailbox on Office 365
Enter your Office 365 Administrator Username and Password
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
Enter a username for the new Shared mailbox (e.g. shared@yourdomain.com): o365support@cogmotive.com
Enter a friendly name for the new Shared mailbox (e.g. My Shared Mailbox): Office 365 Support Mailbox

6. The script will now connect to Office 365 and create the mailbox. Wait for it to finish and you should see something like this.

Waiting for 10 seconds for the mailbox to be created...
Setting 5GB Quota on Mailbox...
Shared mailbox created: o365support@cogmotive.com
Add Mailbox Permissions
Do you want to add permissions to this mailbox?
[Y] Yes [N] No [?] Help (default is "Y"):

7. This mailbox is pretty useless because no-one has permissions to access it yet – so we now help you give other staff members access to see inside this new mailbox. Type y on the keyboard and press Enter.
8. We now ask another set of questions about who should be given access to the mailbox and what type of access that should be. The questions are as follows:
Enter the username for the person or group you want to give access to this mailbox (e.g you@domain.com):
Type the Username of a staff member you’d like to give access to this mailbox. In our example we’re giving access to dan@cogmotive.com
What kind of Permissions do you want to give this user?
You can choose to either give Full Access or Read Only permissions for this user. Full access allows the person to move/delete messages from the mailbox. Read Only lets them only see inside. Type F for Full Access or R for Read Only and press Enter.
Do you want to allow this user to Send As this shared mailbox?
You can choose to also give the user the ability to Send From this mailbox. This is useful if you want emails to appear to come from the shared mailbox. Press Y if you want to apply this permission or N if you don’t, then press Enter.
Do you want the Shared Mailbox to automatically appear in the users Outlook/OWA?
If you want, you can have this mailbox automatically appear in the users Outlook and Outlook Web Access. If you don’t say Yes here, you can always add the mailbox to Outlook manually.
This is what it looks like:

Enter the username for the person or group you want to give access to this mailbox (e.g you@domain.com): dan@cogmotive.c
om
Permission Type
What kind of Permissions do you want to give this user?
[F] Full Access [R] Read Only [?] Help (default is "F"): f
Send As Permissions
Do you want to allow this user to Send As this shared mailbox?
[Y] Yes [N] No [?] Help (default is "Y"): y
Automap Mailbox
Do you want the Shared Mailbox to automatically appear in the users Outlook/OWA?
[Y] Yes [N] No [?] Help (default is "Y"): n
Setting Full Access permissions on the shared mailbox
RunspaceId : dd64db7d-0df1-47b2-8b71-e5ad1856b04a
AccessRights : {FullAccess}
Deny : False
InheritanceType : All
User : EURPRD06\dan573641122450418
Identity : Office 365 Support Mailbox
IsInherited : False
IsValid : True
Confirm
Are you sure you want to perform this action?
Adding recipient permission 'SendAs' for user or group 'dan@cogmotive.com' on recipient 'Office 365 Support Mailbox'.
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): y

Press Y to confirm that you want to add these permissions.
Voila, the permissions have been added! You are now asked if you want to add permissions for another person. Press Y to go through the same bit again, or N if you’re finished.
Now that you’ve created the shared mailbox and assigned permissions to it you can follow these Microsoft instructions to add the Shared Mailbox to your Outlook.
I hope you find this useful!