Forum Discussion

Henn Sarv's avatar
Henn Sarv
Iron Contributor
Aug 30, 2021

new-localuser -name 'MicrosoftAccount\...'

Dear freinds,

 

how to create new MS Account User in WIndows 10/11 using powershell

format in title gives me error - too long name or ask password

 

Henn

  • farismalaeb's avatar
    farismalaeb
    Steel Contributor
    Try this
    New-LocalUser -Name "Test" -FullName "My Test" -Password (ConvertTo-SecureString -String "P@ssw0rd" -AsPlainText -Force)
    • Henn Sarv's avatar
      Henn Sarv
      Iron Contributor
      This one create LOCAL user without MS Account
      My question was - how to create MS Account Local user

      • A Microsoft account is something you will have to register online and you can use it to login to a Windows 10/11 machine. Using MicrosoftAccount\ in a new-localuser doesn't work, the cmdlet new-LOCALuser already tells you that 😉 A MicrosoftAccount is a online/personal account, a AZUREAD\ account is an account which is registered in Azure AD.

Resources