Wednesday, January 23, 2008

Powershell - Creating mailboxes

# Creating a new mailbox in the Punters org
# Asks for a password before creation and uses that password for the user
$pswd = new-SecureString
new-Mailbox -alias "NewTestUserAlias" -name NewTestUser -password $pswd -database “First Database” -org Punters

# Creating a new conference room mailbox
New-Mailbox -alias BigConfRoom -name “Big Conference Room” -database “First Database” -org Punters -resourceType Room

# Creating a new equipment mailbox
New-Mailbox -alias coffeebiscuits -name “Coffee and Biscuits” -database “First Database” -org Punters -resourceType Equipment

# Creating a shared mailbox
new-Mailbox -alias sharedmailbox -name “The Shared Mailbox” -database “First Database” -org Punters -shared

# Creating a linked mailbox
# New-Mailbox -alias linkedmailbox -name “The Linked Mailbox” -database “First Database” -org Punters -LinkedMasterAccount firstname.lastname@domain.com -LinkedDomainController

No comments: