Showing posts with label exhange 2013. Show all posts
Showing posts with label exhange 2013. Show all posts

Friday, September 2, 2016

Exchange 2013. Add mailbox from powershell.

Check database name:

Get-MailBoxDatabase

for existing user mailenable it:

Enable-Mailbox estherv@contoso.com -Database UsersMailboxDatabase

if you create new user:

New-Mailbox -Alias pilarp -Name "Pilar Pinilla" -FirstName Pilar -LastName Pinilla -DisplayName "Pilar Pinilla" -UserPrincipalName pilarp@contoso.com -Password (ConvertTo-SecureString -String 'Pa$$word1' -AsPlainText -Force)

add additional email addresses if needed:

Set-Mailbox "Tom Taylor" -EmailAddresses @{add="tomt@acme.com","tom.taylor@acme.com"} 

choose default reply to address:

Set-Mailbox "Tom Taylor" -PrimarySmtpAddress tom.taylor@acme.com

if mailbox is configured to use an email address policy then you shoul disable it first(before doing previous step):

Set-Mailbox "Tom Taylor" -EmailAddressPolicyEnabled $false

check is user created:

Get-Mailbox <Name> | FL Name,RecipientTypeDetails,PrimarySmtpAddress

check what distribution group configured

Get-DistributionGroup

Add mailbox to distribution group

Add-DistributionGroupMember -Identity "Staff" -Member "tomtaylor@acme.com"