I need some assistance in the bulk PowerShell script to enable some of the users that have been provisioned in the Office 365 Exchange Online, but does not have the OnPremise Exchange mailbox:
This is the one-liners that I must execute manually one by one for every new user provisioned in the Office365:
Source OU:
OU=Global Users,DC=CompanyA,DC=com (225 users in total)
Code: Select all
Enable-Mailuser -Identity samAccountName -primarySMTPAddress First.Last@CompanyA.com -ExternalEmailAddress First.Last@GlobalCompanyLtd.onmicrosoft.com
Code: Select all
Enable-Mailuser -Identity samAccountName -primarySMTPAddress First.Last@CompanyB.com -ExternalEmailAddress First.Last@GlobalCompanyLtd.onmicrosoft.com
Thanks in advance for assisting me in enabling the bulk users with the script.