PS: Create mailbox with new UPN


The Power Shell [PS] command is  to enable mailbox from existing AD user account (non-mail enable user).

(Note: initially I have exported AD users to  csv file from domain in another forest and imported to new domain from different AD domain prefix .CN. Please see my previous post for the export and import process.

[PS] C:\Windows\system32>enable-mailbox -identity username@mydomain.com.cn -database CN-Database -primarysmtpaddress username@mydomain.com

The commands bellows set users in the CN OU to have their login to be similar to their new Primary email address (mydomain.com instead of mydomain.com.cn).

[PS] C:\Windows\system32>Set-AdServerSettings -RecipientViewRoot “CN-OU”  $users = Get-Mailbox $users | ForEach {Set-User -Identity $_.Identity -UserPrincipalName $_.WindowsEmailAddress}

Advertisements

About Robiul

Robiul has 15 years of continuous successful career experience in ICT with extensive background in System Engineering, IT infrastructure design, operations and service delivery, managing IT projects / MIS functions for local and multi-national companies with in-depth knowledge of multiple operating systems as well as construct / manage small to medium size Data Center. Proven ability to design and implement medium to semi-large scale LAN/WAN/WLAN and system infrastructures. Academic qualification: Master of Science in Information Systems. Professional certifications are: MCSE, CCNA, ITIL and FoundStone Security Professional, VCP, NetAPP, CISSP etc.
This entry was posted in Exchange and tagged . Bookmark the permalink.