askvity

How do I disable a Windows 11 account?

Published in Windows Account Management 2 mins read

To disable a Windows 11 account, you can use PowerShell with administrator privileges. Here's how:

Steps to Disable a Windows 11 Account

  1. Open PowerShell as Administrator:

    • Click the Start button.
    • Type "PowerShell".
    • Right-click on "Windows PowerShell" in the search results.
    • Select "Run as administrator". You'll likely be prompted to confirm this action.
  2. List Available Accounts:

    • In the PowerShell window, type the following command and press Enter:
      Get-LocalUser
    • This command will display a list of all local user accounts on your system, including their names and other properties. Note the exact name of the account you wish to disable.
  3. Disable the Account:

    • Type the following command into PowerShell, replacing "ACCOUNT-NAME" with the actual name of the account you want to disable, and press Enter:

      Disable-LocalUser -Name "ACCOUNT-NAME"

      For example, if you wanted to disable an account named "GuestUser", you would type:

      Disable-LocalUser -Name "GuestUser"
  4. Verification (Optional):

    • You can run the Get-LocalUser command again to verify that the "Enabled" property for the account you disabled now shows as "False".

Important Considerations:

  • Administrator Account: Be extremely careful when disabling accounts. Disabling the only administrator account on your system can cause significant problems and potentially lock you out of your computer. Ensure you have at least one active administrator account before disabling others.

  • Microsoft Account vs. Local Account: The above instructions are specifically for disabling local user accounts. If the account is linked to a Microsoft account, these steps will not disable the Microsoft account itself, but only prevent that specific local profile from being used. To manage a Microsoft account, you must do so through the Microsoft account website.

  • Re-enabling the Account: To re-enable a disabled account, use the following command in PowerShell (as administrator), replacing "ACCOUNT-NAME" with the actual account name:

    Enable-LocalUser -Name "ACCOUNT-NAME"

By following these steps, you can effectively disable a local user account in Windows 11 using PowerShell. Always exercise caution when modifying user accounts, especially those with administrator privileges.

Related Articles