You don’t need to be a tech bro to use PowerShell. With just a few slick commands, you can tackle three common Windows headaches:
- Sluggish PC
- Drive clogged with junk files
- Apps totally borked and frozen
Here are three dead-simple PowerShell commands anyone can run to get their rig humming again.
1. Nuke Junk Files in the Temp Folder
The Temp folder is a hot mess of files Windows and apps leave behind. Blast them away with:
Remove-Item "$env:TEMP\*" -Recurse -Force
Pro Tip: Wanna clear out the system-wide Temp folder for even more cleanup? Pop open PowerShell as Administrator and hit:
Remove-Item "C:\Windows\Temp\*" -Recurse -Force
2. Check CPU Usage in Real Time
Curious which app is hogging your CPU? Run this bad boy:
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10
This command spits out the top 10 processes chowing down on your CPU—super handy when your machine’s lagging like crazy.
🔧 Wanna take action? If you spot a runaway process eating up resources, shut it down like a boss:
Stop-Process -Id <PID> -Force
Just replace <PID>
with the process ID shown in the list above.

Bonus Tip: To include process IDs in the list, run:
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10 Name, Id, CPU
Now you’ve got eyes on the CPU hogs and the firepower to stop them.
3. Kill Frozen Apps
Got an app stuck in “Not Responding” limbo? Skip the Ctrl + Alt + Del
dance and use:
Stop-Process -Name "notepad" -Force
Note: Swap “notepad” for the process name you want to zap.
Not sure of the name? Scope out the full list with:
Get-Process
Wrap-Up
PowerShell isn’t just for IT nerds. With a few quick commands, you can:
- Clear out the trash
- Spy on system resources
- Shut down borked apps without rebooting
Heads-Up on Deleting Junk Files
Some temp files might be locked by apps like Chrome, Adobe, or Teams, so you could hit a snag with an error like “The process cannot access the file…” No biggie—it’s normal.
Tips:
🔹 Shut down running apps before cleaning.
🔹 For a deeper clean, reboot and rerun the command.
Smoother Cleanup Command:
Remove-Item "$env:TEMP\*" -Recurse -Force -ErrorAction SilentlyContinue
This skips locked files and keeps the cleanup rolling without hiccups.