I want to change password using cmd.exe but I can't do this. :( Because the user name is of two words(e.g. Engr. Saud). It works only on One word. How I tell cmd.exe as both words are Single user name?
22 Answers
How I tell cmd.exe that both words are a single user name?
the user name is two words (e.g. Engr. Saud)
Use double quotes " around the name.
To remove the password, use the following command:
net user "Engr. Saud" ""Notes:
- The
netcommand must be run from acmdshell that is "Run as Administrator".
Further Reading
- An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
- net - The NET Command is used to manage network resources.
- syntax - Escape Characters, Delimiters and Quotes.
You need to enclose the entire user name in quotes, or otherwise escape the space(s) between the words in the user name. Without doing either of these, the shell will treat a space as a parameter separator, not as part of the parameter.