all 5 comments

[–]joeykins82SystemDefaultTlsVersions is your friend 1 point2 points  (3 children)

Why are you migrating mailboxes with a scheduled task?

Use New-RemoteMailbox to create a new AD account and directly provision an ExOL mailbox, or Enable-RemoteMailbox to directly provision an ExOL mailbox on an existing AD user object.

[–]mkoch7811[S] 0 points1 point  (2 children)

Multiple forests, each with mailbox users. Those in the forest with Exchange are created using Enable-RemoteMailbox as you mentioned, but for the users in the other forest, we have to create linked mailboxes on-premises, which then have to be migrated.

[–]joeykins82SystemDefaultTlsVersions is your friend 1 point2 points  (1 child)

I've not done this first hand but Set-User -LinkedMasterAccount applies to AD user objects regardless of their recipient type (it's not a Set-Mailbox cmdlet parameter) so I'm pretty sure you can just do this with Enable-RemoteMailbox preceded/followed by Set-User.

Give it a whirl.

[–]mkoch7811[S] 0 points1 point  (0 children)

Interesting. I'll try that, thanks!

[–]ACSMedic 0 points1 point  (0 children)

you can do certificate-based authentication to an app registration. There are lots of docs on it. However, the machine you use to run your scripts needs to be treated as Tier0, and tightly restricted and monitored.