ItsmeITItsmeIT
  • Linux
    • Debian
    • Ubuntu
  • PC/Windows
Reading: Windows PowerShell: Delete Junk Files, Check CPU, Kill Unresponsive Apps
Share
Font ResizerAa
ItsmeITItsmeIT
Font ResizerAa
  • Categories
    • Linux
    • Debian
    • Ubuntu
    • PC/Windows
Have an existing account? Sign In
Follow US
© 2025 ItsmeIT. All rights reserved.
Table of Contents
  • 1. Nuke Junk Files in the Temp Folder
  • 2. Check CPU Usage in Real Time
  • 3. Kill Frozen Apps
  • Wrap-Up
  • Heads-Up on Deleting Junk Files

Home » PC/Windows » Windows PowerShell: Delete Junk Files, Check CPU, Kill Unresponsive Apps

Windows PowerShell: Delete Junk Files, Check CPU, Kill Unresponsive Apps

avatar
By Loibv
avatar
ByLoibv
The ItsmeIT team – delivering cutting-edge updates, tech trends, and insider knowledge from the world of technology.
Follow:
Last updated: July 8, 2025

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.

Stop Process using powershell windows
Stop Process using powershell windows

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.

Share This Article
Facebook Reddit Telegram Threads
avatar
ByLoibv
Follow:
The ItsmeIT team – delivering cutting-edge updates, tech trends, and insider knowledge from the world of technology.
Leave a Comment

Leave a Reply Cancel reply

You must be logged in to post a comment.

Most Popular
USB Password-Protect
How to Password-Protect a USB Drive on Windows 11
Add Apps to Windows 11 Right-Click Menu
How to Add Apps to Windows 11 Right-Click Menu
Enable Automatic Dark Mode Windows 11
How to Enable Automatic Dark Mode by Time on Windows 11
Create a System Restore Point Windows
How to Create a System Restore Point to Backup/Restore Windows 10/11
Show Clock Seconds Windows 11
How to Show Seconds on the Windows 11 Taskbar Clock
ItsmeITItsmeIT
Follow US
© 2025 ItsmeIT. All Rights Reserved.
  • Privacy Policy
  • Terms of Service
Logo ItsmeIT logo
Welcome Back!

Sign in to your account

Continue with Google
Register   |Lost your password?