Skip to content

Instantly share code, notes, and snippets.

View araujofrancisco's full-sized avatar
🏠
Working from home

Francisco Araujo araujofrancisco

🏠
Working from home
View GitHub Profile
@araujofrancisco
araujofrancisco / toggle-process.ps1
Last active June 20, 2023 21:57
Start/Shutdown a set of Tasks/Processes Using Powershell
# Get the start parameter from the CLI
param(
[switch]$Start,
[switch]$Shutdown
)
# stop a list of processes
function Stop-ProcessList([String[]] $processes) {
foreach ($process in $processes) {
if (Get-Process -Name $process -ErrorAction SilentlyContinue) {