Stop-App.psm1
function Stop-VisualStudio { Stop-Process ("devenv") } function Stop-VSCode { Stop-Process ("Code - Insiders") Stop-Process ("Code") } function Stop-Edage { Stop-Process("msedge") } function Stop-OneDrive { Stop-Process("OneDrive") } function Stop-PowerShell { Stop-Process("powershell") } function Stop-PowerShellCore { Stop-Process("pwsh") } function Stop-Snagit { Stop-Process("Snagit32") Stop-Process("SnagitEditor") } function Stop-TaskManager { Stop-Process("Taskmgr") } function Stop-NodeJs { Stop-Process("node") } function Stop-Rider { Stop-Process("rider64") } function Stop-Explorer { Stop-Process("explorer") } function Stop-dotnet { Stop-Process("dotnet") } function Stop-Skype { Stop-Process("SkypeProcess") } function Stop-Java { Stop-Process("java") } function Stop-PhotoShop { Stop-Process("photoshop") } function Stop-Chrome { Stop-Process("chrome") } function Stop-Firefox { Stop-Process("firefox") } function Stop-IntelliJ { Stop-Process("idea") } function Stop-Dropbox { Stop-Process("Dropbox") } function Stop-AndroidStudio { Stop-Process("studio64") } function Stop-Spotify { Stop-Process("Spotify") } function Stop-WhatsProcess { Stop-Process("WhatsProcess") } function Stop-Telegram { Stop-Process("Telegram") } function Stop-Process { param ( $ProcessName ) $ErrorActionPreference = 'Stop' try { $process = Get-Process -Name $ProcessName Stop-Process $process.Id Write-Host "The ($ProcessName) has stoped." -ForegroundColor Green } catch { Write-Host "The $ProcessName hasn't found." -ForegroundColor Red } } |