๐ ️ Windows Technical Maintenance Cheat Sheet
For Windows troubleshooting, system maintenance, and basic network diagnostics
Run Command Prompt or PowerShell as Administrator unless otherwise noted.
1. ๐ฆ Update Installed Applications
winget upgrade --allPurpose: Updates applications managed by Windows Package Manager.
Useful commands:
winget upgradeList applications with available updates.
winget listList installed applications recognized by WinGet.
winget upgrade --all --include-unknownAttempt to update packages where the installed version cannot be reliably determined.
2. ๐ง Windows System File Checker
sfc /scannowPurpose: Scans protected Windows system files and attempts to repair corrupted or modified files.
Check only:
sfc /verifyonlyTypical use: Run this when Windows is behaving strangely, applications are crashing, or system components appear damaged.
3. ๐งฐ DISM Component Store Repair
DISM /Online /Cleanup-Image /RestoreHealthPurpose: Checks the Windows component store and repairs corruption.
Useful progression:
DISM /Online /Cleanup-Image /CheckHealthQuick check for previously detected corruption.
DISM /Online /Cleanup-Image /ScanHealthPerforms a more detailed scan.
DISM /Online /Cleanup-Image /RestoreHealthAttempts to repair detected corruption.
Recommended order
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannowDISM can repair the component store that SFC may rely on for repairs.
๐ 4. Battery Diagnostics
powercfg /batteryreportCreates an HTML battery report, normally in your Windows user directory.
To specify a location:
powercfg /batteryreport /output "%USERPROFILE%\Desktop\battery-report.html"Useful information includes:
Design capacity
Full-charge capacity
Battery cycles
Recent battery usage
Battery capacity history
Estimated battery life
Additional power diagnostics
powercfg /energyGenerates a power-efficiency diagnostic report.
๐ 5. DNS Cache
ipconfig /displaydnsDisplays the DNS records currently cached by the Windows DNS Client.
Clear DNS cache
ipconfig /flushdnsUseful when troubleshooting:
DNS resolution problems
Recently changed DNS records
Access to websites by hostname
Local DNS inconsistencies
Additional network commands
ipconfig /allDetailed adapter configuration.
ipconfig /release
ipconfig /renewRelease and renew DHCP configuration.
nslookup example.comPerform a DNS lookup.
๐ง 6. MAC Address / Network Adapter Information
getmac /vDisplays MAC addresses along with adapter information.
A more detailed alternative:
ipconfig /allLook for:
Physical AddressPowerShell alternative
Get-NetAdapterFor additional information:
Get-NetAdapter | Format-List *๐ 7. Useful Network Diagnostics
Test connectivity
ping 8.8.8.8Tests basic IP connectivity.
Test DNS + connectivity
ping google.comIf 8.8.8.8 works but google.com doesn't, investigate DNS.
Trace network path
tracert google.comShows the path packets take toward the destination.
View active connections
netstat -anoShows connections, listening ports, and associated PIDs.
PowerShell:
Get-NetTCPConnection๐ก️ 8. Windows Defender Status
PowerShell as Administrator:
Get-MpComputerStatusCheck Defender detections:
Get-MpThreatDetectionStart a Defender scan:
Start-MpScan -ScanType QuickScanFor a full scan:
Start-MpScan -ScanType FullScan๐ป 9. System Information
systeminfoUseful for quickly collecting:
Windows version
Build number
Hostname
Installed RAM
Boot time
Domain/workgroup
Hotfix information
Network configuration
PowerShell:
Get-ComputerInfo๐ 10. Logged-On Users
query userShows interactive Windows sessions.
Also useful:
whoamiCurrent user.
whoami /allDisplays the user's groups, privileges, and security information.
⚡ Quick Maintenance Runbook
For a periodic check, I would use:
winget upgrade --all
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
ipconfig /flushdns
ipconfig /all
getmac /v
systeminfoThen, from PowerShell as Administrator:
Get-MpComputerStatus
Get-NetAdapter๐งช Cyber/Hacking Laptop Tip
For a dedicated security-testing laptop, I'd also keep system integrity, Defender status, network configuration, listening ports, and installed software documented. That gives you a useful baseline when something changes unexpectedly.
Quick reference:
| Task | Command |
|---|---|
| Update apps | winget upgrade --all |
| Repair system files | sfc /scannow |
| Repair component store | DISM /Online /Cleanup-Image /RestoreHealth |
| Battery report | powercfg /batteryreport |
| DNS cache | ipconfig /displaydns |
| Clear DNS | ipconfig /flushdns |
| MAC addresses | getmac /v |
| Network config | ipconfig /all |
| Connections/ports | netstat -ano |
| System information | systeminfo |
| Current user | whoami /all |
| User sessions | query user |
| Defender status | Get-MpComputerStatus |
| Network adapters | Get-NetAdapter |
Would you like the next version as a one-page printable cheat sheet, Kali-vs-Windows command comparison, or Windows hacking/forensics command sheet?
No comments:
Post a Comment