Enable Mailbox through Powershell for existing AD users


Script:
Import-CSV “C:\text.csv” | ForEach {Enable-Mailbox -Identity $_.UPN -Database “Mailbox Database 1” -Alias $_.alias | Set-Mailbox -EmailAddressPolicyEnabled $false -PrimarySmtpAddress $_.EmailAddress}

CSV File Format:

   

Alias: Alias name for the user(like:ajayk)
UPN: User logon name (like: ajayk@contoso.com)
Email Address: User email address(like: ajaykakkar@contoso.com)

Note: Alias and Email Address could be same or different as per your requirement.

Advertisement

1 thought on “Enable Mailbox through Powershell for existing AD users

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 )

Facebook photo

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

Connecting to %s