Friday, July 20, 2012

Creating an Equipment Mailbox with Powershell on Office 365

Recently, we needed some equipment mailboxes in our Office 365 environment for some development tasks using the Exchange Web Services. It seems like the guides that we found online were typically accurate but were frequently incomplete. They included some of the steps, but not enough to really get going fully. Below are the steps developed in order to create our equipment mailboxes.  The steps include several Powershell commands and should help provision the mailboxes from start to finish.

To start, you'll need to install and configure the Microsoft Online Services Module for Windows PowerShell . You can follow the instructions here to do so, it's easy enough.

Next we'll want to open the Microsoft Online Services Module for Windows Powershell program. It will launch like any other Powershell program. Once loaded, we need to give Powershell the credentials we'll be logging in to Office 365 as. These need to be for a user with Administrator privileges in your Office 365 domain. To do so, run the following command:
  • $credentials = Get-Credential
    • This will spawn a window asking for credentials, enter your Office 365 administrative credentials.


Once Powershell has your credentials, we need to log into the Office 365 servers using the credentials we just set and start our remote session. Use the command below to do so:
  • $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $credentials -Authentication Basic -AllowRedirection
    • This might take a few seconds to complete.

Now we need to import the Powershell commands, from the Microsoft servers to our local session.

Use the command below to do so.
  • $ImportResults = Import-PSSession $session

Now that we are properly staged up with our Session and we've imported the commands from the Microsoft Online Services, we can create the mailbox using the commands below:
  • New-Mailbox -Name EquipmentTest01 -DisplayName "Equipment Test-01" -Equipment
The command above will create a mailbox for the EquipmentTest01 user, with a display name of Equipment Test-01. The only thing that makes this command any different than normal create mailbox commands is just the -Equipment argument. You can add other arguments to this command as well, such as -OrganizationalUnit, or -Database to specify which mailbox store to use.

For our purposes, we need to give another user full access to the mailbox. So we used the following command to delegate the access to the user.
  • Add-MailboxPermission "Development User" -user "Equipment Test-01" -Accessright FullAccess
Once that was completed, we were done. There are more things around creation and delegation that can be performed, so I'll post all the documentation below.

2 comments:

Office 365 said...

For More Information Install Office 365 microsoft office 365 setup
http://www.msoffice-setups.com

Jason Borne said...

We are a third party technical support service. Avast Customer Support is here to help you out with the whole procedure to Download Avast Antivirus online, We not only fix your Avast Support related issues but will guide with how to get started with your new Avast product once it gets installed successfully.We at Avast Tech Support provides service to protect your PC from potential online threats and external attacks like viruses, Trojans, malwares, spywares and phishing scams. And Avast Refund. Call on our Avast Phone Number.

Gmail Customer service is a third party technical support service for Gmail users when they face any technical issue or error in their Gmail account. Our Gmail Customer Support team solves issues like forgot Gmail account password, Gmail configuration or Sync issues, recover deleted emails and many more.

How you install or reinstall Office 365 or Office 2016 depends on whether your Office product is part of an Office for home or Office for business plan. If you're not sure what you have, see what office com setup products are included in each plan and then follow the steps for your product. The steps below also apply if you're installing a single, stand-alone Office application such as Access 2016 or Visio 2016. Need Help with office setup Enter Product Key?

Norton Tech Support is a third party service provider and not in any way associated with Norton or any of its partner companies. At Norton Support we offer support for Norton products and sell subscription based additional warranty on computer and other peripheral devices.

Other Services
Norton Toll Free , Office-Setup , office.com/setup.