Flush the DNS cache
Fixes websites that won’t load after a DNS change.
ipconfig /flushdnsUseful Windows 10 and 11 commands for PowerShell and Command Prompt: repair system files, reset the network, manage apps with winget, generate a battery report and more.
28 commands
Fixes websites that won’t load after a DNS change.
ipconfig /flushdnsIP addresses, DNS servers, MAC addresses and more for every adapter.
ipconfig /allScans protected Windows files and repairs corrupted ones.
sfc /scannowFixes the component store that sfc relies on. Run it if sfc can’t repair something, then run sfc again.
DISM /Online /Cleanup-Image /RestoreHealthFinds and repairs file system errors and bad sectors on drive C.
chkdsk C: /f /rRuns at the next restart and can take hours on large drives.
Fixes many "connected but no internet" problems.
netsh winsock resetRestart afterwards. Some VPN software may need reinstalling.
The password appears next to "Key Content". Use netsh wlan show profiles to list network names.
netsh wlan show profile name="" key=clearSaves an HTML report with design vs. current capacity and usage history.
powercfg /batteryreportThe last column is the process ID (PID).
netstat -ano | findstr :Force-closes the process.
taskkill /PID /FUnsaved work in that program is lost.
Force-closes every running copy of the program.
taskkill /IM /FUpdates every app winget knows about. Run winget upgrade first to see the list.
winget upgrade --allInstalls an app by ID. Find IDs with winget search.
winget install Every installed app with its version.
winget listReboots straight into firmware settings.
shutdown /r /fw /t 0Restarts immediately. Save your work first.
Schedules a shutdown. Cancel it with shutdown /a.
shutdown /s /t Compare the hash with the one published by the download site.
Get-FileHash "" -Algorithm SHA256Makes the PATH environment variable readable.
$env:Path -split ';'Deletes files in your user temp folder. Files in use are skipped.
Remove-Item "$env:TEMP\*" -Recurse -Force -ErrorAction SilentlyContinueInstalls the Windows Subsystem for Linux with Ubuntu. Restart when prompted.
wsl --installPuts a text file on the clipboard.
Get-Content | Set-ClipboardShows whether a TCP connection succeeds. Handy for firewall debugging.
Test-NetConnection -Port Shows uptime in days, hours and minutes.
(Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTimeUseful for warranty lookups.
Get-CimInstance Win32_BIOS | Select-Object SerialNumberBrings back the full context menu without "Show more options". Delete that key to undo.
reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve; Stop-Process -Name explorer -ForceEdits the registry and restarts Explorer.
Open from an administrator terminal so you can save changes.
notepad C:\Windows\System32\drivers\etc\hostsOS version, install date, memory, hotfixes and more.
systeminfoEvery command copies as plain, clean text: no curly quotes, no long dashes, no invisible characters.