Share via

A powershell command to disconnect work or school account

Eli 11 Reputation points
Mar 16, 2022, 3:07 PM

Hi,

Looking for a powershell to easily disconnect all of user's school or work account (it helps in a lot with issues concerning Teams).

This needs to run while the user is signed in with his privileges.

Thanks!

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,783 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,686 Reputation points
    Mar 23, 2022, 1:01 PM

    Hi @Eli

    Thank you for your question and reaching out.
    I can completely understand That,
    You can check this
    Get-ItemProperty -Path "C:\Users*\AppData\Local\Packages" | ForEach-Object {
    Remove-Item -Path "$_\Microsoft.AAD.BrokerPlugin*" -Recurse -Force | Out-Null
    }

    Or
    Nevigate
    %USERPROFILE% > AppData > Local > Packages

    After logging in as a local admin, delete or rename the user's folder that starts with "Microsoft.AAD.BrokerPlugin_"

    Once you log back in as the user, the connected account should be gone.

    And see if it helps,

    Thank you

    --
    --If the reply is helpful, please Upvote and Accept as answer--

    6 people found this answer helpful.

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.