mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-07 13:34:55 -06:00
25 lines
426 B
PowerShell
25 lines
426 B
PowerShell
function Get-WinUtilInstallerProcess {
|
|
<#
|
|
|
|
.SYNOPSIS
|
|
Checks if the given process is running
|
|
|
|
.PARAMETER Process
|
|
The process to check
|
|
|
|
.OUTPUTS
|
|
Boolean - True if the process is running
|
|
|
|
#>
|
|
|
|
param($Process)
|
|
|
|
if ($Null -eq $Process){
|
|
return $false
|
|
}
|
|
if (Get-Process -Id $Process.Id -ErrorAction SilentlyContinue){
|
|
return $true
|
|
}
|
|
return $false
|
|
}
|