You Will Learn How to
- Create user mailbox account in exchange 2016
- Create Bulk user mailbox account by using powershell
- Powershell script to create bulk user mailbox
Exchange Server Hybrid is really necessary for coexistence between on-premises and Exchange Online, smooth transition and migration to Exchange Online from on-premises, as well as managing Exchange Online resources from on-premises while AADConnect is enabled. Apart from that, Exchange Hybrid can be de-commissioned and Exchange Server itself in a very small footprint can be left on-premises in the scenario where AADConnect will be in-place.
If you have Moved your exchange environment from 2010 to 2013 or 2016, the new joiner account creation is different in hybrid model. Powershell script becomes handy and automate the process.
To create user mailbox account in Hybrid model, Powershell script for creating multiple users mailbox.
Download the Excel file, Fill the user details, save and store in temp location. Run the below Powersehll script.The new user account will created in your AD and on exchange environment.
# Creating Mailbox on Hybrid Model Exchange environment
1 2 3 4 5 6 7 8 9 10 11 12 13 |
param( [Parameter( Mandatory=$false)] [string]$URL="inexch01" ) $UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://$URL/PowerShell/ -Authentication Kerberos -Credential $UserCredential Import-PSSession $Session write-Host 'connected to Exchange Server .......' -NoNewline -ForegroundColor Green $CSVLocation = "C:\temp\createUserMailbox.csv" |
### Step 1 – User Creation
1 2 3 4 5 6 7 |
write-Host 'Creating User Mailbox .......' -NoNewline -ForegroundColor Green Import-CSV $CSVLocation | ForEach-Object { New-RemoteMailbox -Name $_.Name -FirstName $_.FirstName -Initials $_.Initials -Lastname $_.LastName -UserPrincipalName $_.UPN -OnPremisesOrganizationalUnit $_.OU -Password (ConvertTo-SecureString $_.password -AsPlainText -Force) -ResetPasswordOnNextLogon $false } write-Host 'user account created .......' -ForegroundColor Green |