Useful Windows Commands

These commands are ones that I’ve used pretty regularly over the years and in PowerShell.

charmapCharacter Map
chkdiskRepair disk utility
dcdiagDomain Controller Diagnostic which runs on a Windows Server, I generally use it with the following switches: dcdiag /c /v /e /q
For more information about the switches use dcdiag /?
gpupdate /force [/target:[user|computer]]Group Policy update immediately for that user / computer
gpresult /RGet the results of the last group policy update that occurred whether forced using gpupdate or result of the group policy update interval. This is from the user’s context only, for a more complete report use gpresult /h /c:\[pathtofile]\[reportname].html
ipconfig [/all]Display IP Configuration for all network adapters.
netstatDisplay all active network connections
nslookupreturns your local DNS server, if you add a domain name it will resolve it to it’s IP Address if your local DNS server can resolve it.
odbcad32ODBC Data Source Administrator
powercfg.exe -h offTurn off hibernation. Administrative CMD prompt required
regeditRegistry Editor, be sure to Export any registry keys / values before you make changes just in case.
sfc /scannowIn the event you feel some windows system files may have been corrupted or something is wrong with Windows you can run this to fix any system files.
systeminfoDisplays various system information in the text console. Provides quite a bit of information in one place, like Operating System version, last boot time, hotfixes applied, and memory information among other things.
taskkillKill processes in command-line interface, provide PID.
tracert [-d] FQDN or IPTrace the route your computer takes to reach an network host, excellent tool for troubleshooting networking issues.

You can find a complete comprehensive list from Windows commands | Microsoft Learn

Also see Windows Environment Variables – Windows CMD – SS64.com which is an excellent resource.