Forum Discussion
new-localuser -name 'MicrosoftAccount\...'
Ok, than I didn't interpret your question correctly. Never did that, I usually login using AzureAD account or a local account in which I add a work/school account. Linking these two together is something I didn't do before, for my understanding it's a local account (which you create during installation) with a online Microsoft account on top of that in the same local user profile.
And you want to do this using scripting when deploying a new workstation?
When You click on Settings/Account/Other people and New Account then system ask You MS Account to bind new account
When PS Is AzureAD Joined, system ask you AzureAD Account to bind You
To create unlinked local account You have Open Computer Manager / USer or click several time on some kind of "advanced"
So only simple question is - how to automate this kind of creation