Quickly disable windows user account via command line?
Very popular is the easy and fast deactivation of users via command line on MS Windows 11, 10, ... and MS Server 2022, 2019, ... operating systems!
Everyone knows how to quickly obtain information about a specific user account, but NET USER can do even more, especially those who have created many user accounts may want to quickly deactivate one or the other, why not if it is possible in the command prompt.
1.) Deactivating user accounts via the command prompt!
1. Start the command prompt in admin mode << As described here
(Windows + R command cmd and Ctrl + Shift + Enter)
2. Now you can list all with net user if the user name is not known
3. And the relevant user Deactivate account, for example "user-1" in this case
To deactivate the account just type the command with /active:no here in the example the user account is "user-1" to deactivate it or /active:yes here as an example :
C:> net user
C:> net user user-1 /active:no
The command ran successfully.
C:> net user user-1 /active:yes
The command ran successfully.
It always appears after confirming "The command was executed successfully." if the ran successfully, or the error message if it failed.
2.) What should be considered when deactivating a user account?
You should use it with caution so that you don't unintentionally lock yourself out of the MS Windows PC, because then only starting in safe mode and the system administrator account will help!
But quite practical, especially on the Windows Home versions! Disabling a user account removes the account's icon from the login screen and the Fast User Switching menu
The nice thing is you can always reactivate the account later without losing any data and it not only works in Windows 10 and 11 but activation or deactivation works on any MS Windows OS!
3.) More tips on user accounts and the command prompt ... and one way or another!
FAQ 137: Updated on: 26 August 2023 11:00
Deleting file or folder via command prompt on MS Windows desktop and server operating systems is a popular solution to delete Every once in a while, due
Automation batch files for Windows are becoming more and more popular, it is even more important to correctly name and use the batch, which is often referred
The Windows CMD has internal commands that are in the command prompt itself, this does not start another exe that is started separately The external commands
Sometimes you just want a plain example of a subfunction ergo Sub-Routine in a command prompt batch file to understand how it works The CALL command starts
Sometimes you just want to rename JPEG to JPG to keep things in order, you can do that easily from the command line on MS Windows Desktop and Server OS
The classic search in files for a character string via the command prompt is hardly used anymore, but it is still available on Windows 11, 10, In order
Deleting files without content with a batch file, command prompt, or via the address bar in File Explorer is quite popular Here you can find out. that
»» My question is not there in the FAQ
Keywords: 2019, 2022, windows, console, quickly, disable, user, account, command, line, very, popular, easy, fast, deactivation, users, server, operating, systems, everyone, Questions, Answers, Software