mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-07-05 07:00:04 +02:00
Improve close-program.ps1
This commit is contained in:
@ -42,7 +42,7 @@ try {
|
||||
start-sleep -milliseconds 100
|
||||
stop-process -name $ProgramName -force -errorAction 'silentlycontinue'
|
||||
}
|
||||
write-host -foregroundColor green "✔️ closed $FullProgramName, found ($($Processes.Count) process(es)"
|
||||
"✔️ closed $FullProgramName, stopped $($Processes.Count) process(es)"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Reference in New Issue
Block a user