This guide shows you how to use Windows PowerShell to run a thorough health scan of your Windows 10 computer. You’ll check system files, disk health, memory, and security settings, and get clear reports you can act on. No prior PowerShell experience is needed—just follow the steps in order.
What You’ll Need
- A Windows 10 PC with administrator access
- An internet connection for some commands (e.g., Windows Update check)
- About 15–30 minutes of time, depending on your system speed
Step-by-Step
- Open PowerShell as Administrator. Click the Start button, type
PowerShell, right-click “Windows PowerShell� in the results, and select “Run as administrator.� Click “Yes� if prompted by User Account Control. - Check the PowerShell version. Run
$PSVersionTable.PSVersionto see which version you have. Anything 5.1 or higher is fine for these commands. - Scan system files for corruption. Run
sfc /scannow. This checks all protected system files and replaces any that are damaged. It can take 10–15 minutes. Let it finish completely. - Check and repair the system image. Run
DISM /Online /Cleanup-Image /RestoreHealth. This repairs the Windows image itself, which SFC relies on. It may take 20 minutes or more. If it gets stuck at 20% or 40%, that’s normal—wait it out. - Run SFC again after DISM. Run
sfc /scannowonce more. This ensures any files that were fixed by DISM are now properly verified. - Check disk health. Run
Get-PhysicalDisk | Select-Object DeviceId, FriendlyName, HealthStatus, MediaType. Look for a HealthStatus of “Healthy.� If it says “Warning� or “Unhealthy,� back up your data and consider replacing the drive. - Check disk errors. Run
chkdsk C: /scan(for your system drive). This scans for file system errors without restarting. If it finds issues, runchkdsk C: /spotfixto fix them (may require a restart). - Check memory for problems. Run
mdsched.exe. This opens the Windows Memory Diagnostic tool. Choose “Restart now and check for problems.� The test will run after reboot and take about 10 minutes. Results appear after the test finishes. - Review installed updates. Run
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10. This shows the most recent updates. If the list is empty or very old, runStart-OSCP(if available) or go to Settings > Update & Security > Windows Update and click “Check for updates.� - Check for malware with a built-in tool. Run
Start-MpScan -ScanType QuickScan. This triggers a Windows Defender quick scan. For a deeper check, useStart-MpScan -ScanType FullScan(can take hours). - Check system event logs for errors. Run
Get-EventLog -LogName System -EntryType Error -Newest 10 | Format-List TimeGenerated, Source, EventID, Message. This shows the most recent system errors. Note any recurring ones (e.g., disk, driver). - Check battery health (laptops only). Run
powercfg /batteryreport. This generates a report atC:\Users\YourName\battery-report.html. Open it in a browser to see the battery’s design capacity vs. full charge capacity. - Review startup programs. Run
Get-CimInstance Win32_StartupCommand | Select-Object Name, Command, Location. This lists everything that runs at startup. Disable unnecessary ones in Task Manager (Ctrl+Shift+Esc > Startup tab). - Check network configuration. Run
ipconfig /allandGet-NetIPConfiguration. Look for valid IP addresses and DNS servers. If you see 169.254.x.x, your DHCP is failing. - Save a full report. Run
Get-ComputerInfo | Out-File -FilePath C:\SystemInfo.txt. This saves hardware and OS details. Also runGet-Process | Sort-Object CPU -Descending | Select-Object -First 10 Name, CPU, WorkingSetand note any process using high CPU or memory.
Common Mistakes
- Not running as administrator. Most scan commands (SFC, DISM, chkdsk) require admin rights. If you get “access denied,� close and reopen PowerShell as admin.
- Interrupting SFC or DISM. Letting the computer sleep or closing the window can corrupt the repair. Keep the session active and wait.
- Running DISM before SFC. The correct order is DISM first, then SFC. Running SFC first may not fix everything because the image itself is damaged.
- Ignoring the HealthStatus. If Get-PhysicalDisk shows “Warning,� that’s a sign of imminent failure. Back up immediately.
- Using chkdsk /f on the system drive without a restart. It will prompt you to schedule a restart. Don’t skip it.
Tips
- Run these scans monthly to catch issues early.
- Use
Get-WinEvent -FilterHashtable @{LogName='System'; Level=2; StartTime=(Get-Date).AddDays(-7)} | Select-Object -First 20to see errors from the past week. - For a quick health check, run
Get-Volume | Where-Object {$_.DriveLetter} | Select-Object DriveLetter, FileSystemLabel, HealthStatus, SizeRemainingto see all volumes. - If you see many DISM errors, check the CBS log:
Get-Content C:\Windows\Logs\CBS\CBS.log -Tail 50. - Create a PowerShell script with all these commands and run it monthly. Save it as
Scan.ps1and run it as admin. - Use
Get-Service | Where-Object {$_.Status -eq 'Stopped' -and $_.StartType -eq 'Automatic'}to find services that should be running but aren’t.
Troubleshooting
- SFC says “Windows Resource Protection could not perform the requested operation.� This usually means you’re not admin, or the system is busy. Reboot, reopen as admin, and try again. If it persists, run DISM first.
- DISM fails with error 0x800f081f. This means the source files are missing. Try
DISM /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows /LimitAccessafter placing a Windows 10 ISO at C:\RepairSource. - chkdsk says “The type of the file system is NTFS. Cannot lock current drive.� That’s normal for the system drive. Type
Yand restart to schedule the scan. - Memory diagnostic doesn’t show results. After the test, open Event Viewer (eventvwr.msc), go to Windows Logs > System, and look for “MemoryDiagnostics-Results� event ID 1101.
- Start-MpScan fails. Ensure Windows Defender is enabled. If you use a third-party antivirus, Defender may be disabled. Use that AV’s scan instead.
- Get-EventLog error “Requested registry access is not allowed.� Run PowerShell as admin.
Frequently Asked Questions
Is it safe to run these commands?
Yes, all commands listed are built into Windows and are safe when run as described. They only read or repair system files.
How long does a full scan take?
SFC takes 10–15 minutes, DISM 20–30 minutes, a full Defender scan can take hours, and chkdsk on the system drive can take 30+ minutes. Plan accordingly.
Do I need to restart after running SFC?
Not usually, but if SFC says it fixed files, a restart is recommended to ensure the changes take effect.
Can I use these commands on Windows 11?
Yes, most commands work identically on Windows 11. A few like Get-HotFix may show slightly different output, but the core scans are the same.
What does DISM actually do?
DISM (Deployment Imaging Service and Management) repairs the Windows system image, which is the core set of files that SFC uses to verify other files. Fixing the image first makes SFC more effective.
How do I know if my disk is failing?
If Get-PhysicalDisk shows HealthStatus as “Warning� or “Unhealthy,� or if chkdsk reports bad sectors, back up your data immediately and consider replacing the drive.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- How to Pause Snapchat Location
- System Restore Points Missing in Windows? Fixes
- Fix Device Manager Not Opening in Windows 11
- Loop Nature Ambience Videos with FFmpeg on Ubuntu
- Install League of Legends on Linux: Full Guide
- Fix Error 0x80070001: Causes & Solutions