Windows Command Line Editor

Managing user account and groups with “net” command line. The Net user command line is a built-in Windows Command tool. It uses for creating, deleting and managing user account in Windows operating system. Managing user account using command line and graphical interface both are easy. But the command line is high-speed and powerful. The net command utility works on command prompt and PowerShell.

To learn more about Powershell, just read the PowerShell articles on the technig.com. And let’s start managing user account with a command line.

How to change drives in MS-DOS and Windows command line. Creating a new file. You can create a new file from the command line using the edit command, copy con command, or using the start command to open a file. How to create a file in MS-DOS and the Windows command line. Creating a new batch file. In the new test directory, let's create your. Edit a text file on the console in 64-bit Windows, Basic text editor in command prompt? – phuclv Sep 16 '18 at 2:04 1 if you do have a graphic desktop but simply want to edit a file directly from cmd then you can use notepad e.g. With notepad myfile.txt – ccpizza Aug 16 '19 at 13:25. MS-DOS Editor (or just edit) is a 16-bit text editor that is still included with 32-bit versions of Windows XP, Vista, 7, 8 and 8.1. It can edit files upto 65,279 lines long and has mouse support. Being an 16-bit DOS editor, it cannot run directly on 64-bit versions of Windows. It can be launched by typing edit at the command prompt.

Managing user account using command line in Windows 10:

  • One can easily modify the Hosts file in early Windows operating systems by the ‘edit’ command in command prompt. You just need to open the command prompt windows with “Administrator” privilege and go to the location of the Hosts file and edit it by using ‘edit’ command. But, this procedure doesn’t work on Windows 8.1 and 10.
  • Ipconfig.exe, for example, is found in the C: Windows System32 directory, which is a part of the system PATH by default. When you type ipconfig into a Command Prompt, Windows doesn’t need to know where that EXE is–it’ll check all the folders in its PATH until it finds the right one.
  1. Net user command review.
  2. Add a user account with command.
  3. Set Password to a user account with command.
  4. Change user account password using a command line.
  5. Upgrade standard user to an Administrator account.
  6. Delete a user account and profile with command.

To run net user command, open command prompt or PowerShell with typing “cmd” on Windows Run.

  1. Press Windows+R to open the run.
  2. Type “cmd” and press enter for command prompt. And for Powershell just type “Powershell.”
  3. Now, type “net user /?” and press enter to see the net user command line help.

Note: If you want to execute net user to add a new user or bring changes, you must run cmd or Powershell as administrators. It does not work as standard users. To run them as an administrator, just press Windows and search Powershell then press Shift+Ctrl and press enter.

Command

Managing User Account using Command Line

To understand the structures of a command prompt command, get the help by typing “/?” at the end of any command on command prompt and PowerShell. It will show you the help documents.

Add a New User Account with Command Line

Let’s start and create a new user account with the net user command, named Ali with Password 123, and press enter. Type the following command to add a new user account with the command line in Windows 10.

The user Ali has been created successfully. If it shows the Access denied error, it means that the command prompt is running as standard users, like bellow error.

To view the complete information for a newly created user account, just type “net user Ali” and press enter. It will show you the user local group membership, Global group membership, date of creation, etc.

Set Password to User Account with command

To set a password to a user account or changing password of a user account, type “net user Ali *” command then press enter and type the new password twice.

You can use this method to change any user account password in Windows 10 and other Windows operating systems.

Change Standard User to Administrator in Windows 10

You have created a new standard user account successfully and now try to add this user account to a Administrators group. The administrator privilege gives you the ability to bing changes to Windows 10 system and settings. With a standard user account, you cannot run the command, install software and change Windows settings. To change standard user to Administrator in Windows 10, just type the following command.

On the user information, you saw that Ali was only the member of Users group which is a standard group. You can add a user account to a group with “Net Localgroup” command.

To remove a user group membership, type the following command and press enter

Delete a User account with Net User Command

Windows Command Line Editor Powershell

If you don’t need a user account anymore, don’t leave it away. Delete or disable it for security reasons. Someone might crack the password and log in to your system. To delete a user type “net user Ali /delete” command.

Editor

Text Editor Command Line Windows

Note: When you remove a user with net user command line, the profile’s of deleted user account remains in the user profiles folder. You must delete it manually from user profile setting. Read this article “Remove User Profile correctly in Windows 10“.

I hope you find the article managing user account using command line in Windows 10 helpful. If you have any problem or question about the managing user account using command line feel free and ask through comment. If you don’t like to use command line, try to read the article about creating a user account with a graphical interface in Windows 10.

In my quest to become more familiar with using the Windows Command Prompt I have been experimenting with basic text editing and file management from the command prompt to cut the distraction between switching from an IDE to the terminal all the time. I found that working with a text editor like Sublime Text or working with an IDE like Brackets you often need to switch back and forth between your terminal and editor, well what if I could perform text editing in the command prompt just like I do with Vim or Nano in Linux? This would enable me setup my Gulp files, run my Node Package Manager commands and exit the command prompt for a good deal of time before returning.

Getting started on the command prompt is very easy, it is the same concept as the Unix terminal except the folder structure is different and some of the commands are different. Here is a crash course in the command prompt to get your started:

All of this was not that hard to get started, very straight forward and to the point. Except when it came time to edit my text files I was creating. That caused a bit of an issues because Windows does not have a default text editor out of box in the command prompt. I had to look elsewhere to find one, and my search brought me to Vim. Vim is a lot like Vi from the Unix world except it has a bit more to offer, such as syntax highlighting and plugin capability. After installing Vim for Windows, found here, I was able to use the vim command to open and edit files with the same commands that you would use for Vi.