To determine when the password for your Active Directory user account will expire, open a command prompt window and type the following command:
net user %USERNAME% /domain
The output of this command will span several lines, so look for the line that starts with "Password expires" and you can see the exact day and time when your domain password will expire.
If you have feedback concerning this tip, please email me. And be sure to check out my website!
worked like charm
The user name could not be found.
More help is available by typing NET HELPMSG 2221.
You may be using PowerShell, type cmd in there to open Command Prompt within it or open a different cmd window then run the command.
i get the same as John and I am in a command prompt, not a powershell
You can also pipe the output to findstr to limit the output. Example:
net user %username% /domain | findstr “Password expires”
If you are getting “The user name could not be found” your account may not be a local account not a domain account. So omit the ‘domain’ part of the command – “net user %USERNAME%”
I keep getting the message that “the specified domain either does not exist or could not be contacted”, so any ideas on what I should do now?