There are only two Microsoft-approved ways to reset a Windows password which are discussed at the bottom of this page.However, there are a number of reasons why one or the other method very often isn't an option.
How to Reset Your Windows Password
You can reset your computer password by temporarily overwriting the Ease of Access executable with the Command Prompt executable from outside of Windows, enabling that now-overwritten feature from the Windows login screen to open Command Prompt, and then resetting your account password via the net user command.
While this password reset process is fairly involved and requires working from a command line, it's very much within the ability of anyone reading this.
That said, the process differs in important ways between versions of Windows, mainly due to the different ways the various Microsoft operating systems give you access to Command Prompt from outside of Windows. Because of these differences, we've created very detailed password reset tutorials you can follow, specific to which Windows version you're using:
Important: To use this password reset method, you'll need access to some sort of recovery or installation media for your version of Windows. Original installation media will work for Windows 10, 8, 7, and Vista. A System Repair Disc is good if you're using Windows 10, 8, or 7, or a Recovery Drive if on Windows Windows or Windows 8. Using installation or recovery media from another computer, yours or a friend's, is fine and won't break any license agreements with Microsoft - just make sure it matches your version of Windows exactly.
What About Windows XP?
It is possible to make this trick work for Windows XP but it's not nearly as straightforward as it is with newer versions of Windows due to the way Recovery Console works.
Microsoft "Approved" Password Reset Methods
There are two preferred ways to reset a Windows password and we recommend that you choose one of these instead of following the procedure above - if your situation allows for it.
If you use Windows 10 or Windows 8 and use an email address to log in, then follow How to Reset Your Microsoft Account Password instead of the advice above. In this particular situation, and only in this situation, this isn't just the preferred method to use; it's one of the only ways that works. Another option is password recovery software but there's no guarantee with one of those.
If you previously created a password reset disk or flash drive, and know where it is, then use that at the login screen in any version of Windows. If you're using Windows 10 or 8 with a Microsoft Account (you log in with an email address), you were never able to create a password reset disk and so you shouldn't have one to try.