Changing a Windows Password at the Command Line

Overview

This article provides step by step instructions to change your password at the command line. This allows you to create a complex password via cut-and-paste from a password generator.

WARNING

This procedure is dangerous. If you perform it for a user that is NOT the one currently logged in, that user will lose their data.

Proceed with caution!

Procedure

1. Open a Command Prompt using the "Run as Administrator" feature.

This can be done by right-clicking on any shortcut to the Command Prompt and selecting "Run as Administrator" from the context menu.

2. Type the following command, replacing Username with the username for the currently logged-in user and MyNewStrongPassword with your new password.

net user Username MyNewStrongPassword