Useful CMD commands for Windows
15 views
sfc /scannow
This command checks the integrity of all important and protected Windows system files. If it finds that a file is damaged, deleted, or overwritten with an incorrect version, it will automatically attempt to replace it with the correct version from a backup stored on your disk (specifically, in a compressed folder in Windows).
DISM /Online /Cleanup-Image /RestoreHealth
While SFC attempts to repair files from a local backup, DISM goes one step further. This command checks the overall "image" of your system (component store) and determines whether the local backup itself is damaged. Using the /RestoreHealth parameter, DISM connects to Windows Update servers, downloads fresh, undamaged files from Microsoft, and replaces the broken ones on your computer with them.
ipconfig /flushdns
It clears (literally "flushes") the so-called DNS cache on your computer. You can think of DNS as the internet's phone book – it translates human-readable website names (e.g., seznam.cz) into numerical IP addresses for computers. Your system remembers these translations so that websites load faster. However, if the IP address of a website has recently changed, your computer may still try to connect to the old one (which it has in its memory) and the website will not load. This command clears the memory and forces the computer to find the IP addresses again, from scratch.