https://github.com/rezapace/scrip-close-all-program
This PowerShell script retrieves a list of all running processes on your computer, checks if they have a window title (`mainwindowtitle`), and ensures they are not PowerShell itself. If these conditions are met, the `stop-process` command is used to close those programs.
https://github.com/rezapace/scrip-close-all-program
close git-reza kuliah-malam kumal kumal-projek poweshell script webkumal
Last synced: 3 months ago
JSON representation
This PowerShell script retrieves a list of all running processes on your computer, checks if they have a window title (`mainwindowtitle`), and ensures they are not PowerShell itself. If these conditions are met, the `stop-process` command is used to close those programs.
- Host: GitHub
- URL: https://github.com/rezapace/scrip-close-all-program
- Owner: rezapace
- Created: 2022-11-21T17:04:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-01T00:42:42.000Z (9 months ago)
- Last Synced: 2025-01-18T06:27:52.619Z (4 months ago)
- Topics: close, git-reza, kuliah-malam, kumal, kumal-projek, poweshell, script, webkumal
- Language: PowerShell
- Homepage: https://www.webkumal.link/
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SCRIP-CLOSE-ALL-PROGRAM
## Description
This PowerShell script retrieves a list of all running processes on your computer, checks if they have a window title (`mainwindowtitle`), and ensures they are not PowerShell itself. If these conditions are met, the `stop-process` command is used to close those programs.
## Key Features
- Retrieves all running processes.
- Filters out processes without a window title.
- Excludes PowerShell from being terminated.
- Closes all qualifying programs.## How to Use
1. **Download the Script**: Download the `script-close-all-program.ps1` file.
2. **Run the Script**: Double-click the downloaded file to execute it.
3. **Effect**: The script will close all running programs on your computer, except for PowerShell.## Important Notes
- **Save Your Work**: Ensure you save all your work and close any programs you want to keep open before running this script.
- **Data Loss Warning**: Any unsaved data or improperly saved work will be lost if the program is closed by this script.## Example Command
```powershell
(get-process | ? { $_.mainwindowtitle -ne "" -and $_.processname -ne "powershell" } )| stop-process
```This command retrieves all processes with a window title, excludes PowerShell, and stops the remaining processes.