How to close all open apps with one command in Windows 11



This article details closing all open apps simultaneously in Windows 11 via a single command. This action, involving either Command Prompt or Windows PowerShell, is handy for freeing up memory or troubleshooting issues from excessive app usage. It emphasizes leaving the File Explorer and Windows Registry Editor unaffected.

This article explains how to force all open apps to close at once with a single command in Windows 11.

Open apps in Windows refer to the programs currently running on your computer. These apps can be visible on your taskbar or hidden in the background.

If you need to stop and close all open apps without shutting down or restarting your computer, the steps below will show you how.

Closing all open apps quickly with a Windows command can be useful when you need to free up memory or troubleshoot issues caused by running too many applications simultaneously.

Force close all open apps using the Command Prompt

One way to force close all open apps in Windows is to use the Command Prompt.

First, open Windows Terminal and select Command Prompt.

When in the Command Prompt console, run the command below.

PowerShell -Command "Get-Process |? {$_.MainWindowTitle -ne \"\" -and $_.Id -ne $PID -and $_.ProcessName -ne \"explorer\"} | Stop-Process -Force"

This will close all open apps except File Explorer and the Windows Registry Editor.

Force close all open apps using Windows PowerShell

Another way to force close all apps is to use Windows PowerShell.

First, open Windows Terminal and select PowerShell. By default, it is opened with Windows Terminal.

On the console, run the command below.

Get-Process |? {$_.MainWindowTitle -ne "" -and $_.Id -ne $PID -and $_.ProcessName -ne "explorer"} | Stop-Process -Force

That should do it!


This post showed you how to close all open apps in Windows 11. Please use the commands form below if you find errors or have something to add.

Like this:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.