Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Need help scripting this for an OU, please help!

$
0
0

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

http://www.msexchange.org/articles-tutorials/office-365/exchange-online/match-office-365-mailbox-new...

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”}


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>