Files
winutil/functions/private/Get-WinUtilInstallerProcess.ps1
T

25 lines
428 B
PowerShell
Raw Normal View History

+3
2023-03-07 12:28:00 -08:00
function Get-WinUtilInstallerProcess {
<#
2023-10-19 17:12:55 -05:00
.SYNOPSIS
Checks if the given process is running
.PARAMETER Process
The process to check
.OUTPUTS
Boolean - True if the process is running
+3
2023-03-07 12:28:00 -08:00
#>
param($Process)
if ($Null -eq $Process) {
+3
2023-03-07 12:28:00 -08:00
return $false
}
if (Get-Process -Id $Process.Id -ErrorAction SilentlyContinue) {
+3
2023-03-07 12:28:00 -08:00
return $true
}
return $false
}