I need to replicate these steps on an OU, I have done is to 5 users manually and all mail flow is now working, I still have another 150 users, is there any way I can script this to run on an OU and I will manually add the domain.mail.onmicrosoft address manually in attribute editor?
Here is the article
these are the 4 commands
from what i gather i need to import exchange and active directory mdules, but how can i run this on a whole OU? thanks again.
Enable-MailUser
username –ExternalEmailAddress example@contose.com
Set-ADUser username –Replace @{msExchRecipientDisplayType =
“-2147483642”}
Set-ADUser username –Replace @{msExchRecipientTypeDetails = “2147483648”}
Set-ADUser username –Replace @{msExchRemoteRecipientType = “4”}