Powershell cmdlet for creating a new mailbox in Outlook Live

I am working with a customer who is building a self-service web application that allows users to register their own LiveID/Mailbox on Live@edu; something I hope to be able to share more about at some point soon.  A question came up today about the PowerShell cmdlet that is needed to create the account on our end.

The functioning of this cmdlet has changed a little since we first shipped Exchange Labs (now Outlook Live).  It now requires that the password string be passed as a secure string, and in plain text… so now the complete action is a 2-liner at a minimum.  An example is below for your reading pleasure.

$Password = ConvertTo-SecureString ‘<string>’ -AsPlainText -Force

new-mailbox -Name <string> -Password $Password -WindowsLiveID <string> -ResetPasswordOnNextLogon <number> -FirstName <string> -LastName <string> -DisplayName <string>

Thus:

$Password = ConvertTo-SecureString ‘MyPassword’ -AsPlainText -Force

new-mailbox -Name JonnyC -Password $Password -WindowsLiveID jonnyc@contososchool.info -ResetPasswordOnNextLogon 0 -FirstName Jonny -LastName Chambers –DisplayName “Jonny Chambers”

More to come, as I say.

Jonny

Advertisements

2 Responses to Powershell cmdlet for creating a new mailbox in Outlook Live

  1. Unknown says:

    Can you create a mailbox for an existing WindowsLiveID in your space (@contososchool.info)? I am interested in moving a WindowsLiveID user between MailUser and Mailbox as they change roles. It looks like there are remove-* to remove the mailbox or mailuser status without eliminating the WindowsLiveID — but can they be reconnected to new Exchange states?

  2. US LiveAtedu says:

    Currently we don\’t completely support the changing of states as you point out below… you can convert a Mailboxes into MailUsers, but in doing so, you delete the mailbox, and it cannot be reconnected to, nor can you create a new mailbox.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: