powershell command/script

Jacques Strydom 1 Reputation point

Good Day. I am looking for a power shell command string/script that will do the following.
I have 3 Microsoft accounts signed in on a pc in this order
account 1: local machine account
account 2: personal Microsoft account
account 3: business Microsoft account

what i want to happen:
1.take the local machine account and make that the default sing-in(log on) account for the pc.
2.use the personal Microsoft account to be the only account used for one drive
3. use the business Microsoft account to be the only account used for office 365 and Microsoft teams.

Microsoft 365 Publishing
Microsoft 365 Publishing
Microsoft 365: Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line. Publishing: The process of preparing, producing, and releasing content for distribution or sale.
595 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,762 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,345 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Germán López Castañeda 21 Reputation points


    Is it the PC in a home environment or domain joined.

    0 comments No comments