Script to set account?

Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange

I'm looking for a way to create a new Outlook profile plus add 2 accounts to the profile. We are currently running two profiles as a test and know that it works.

Due to a corporate merger, we need to add a second mailbox for over 100 users, which I would prefer to do via a script. and in the process we need to set one of the two accounts as the primary.

I've seen the ZeroConfigExchange method but it uses autodiscover to add the accounts, which means that it won't add the second account and it won't allow setting one of them as primary.

Also, we are using Office 265, not Exchange, so using autodiscover is required but we need a way to add both accounts.

any help on doing this would be greatly appreciated.