mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-15 17:30:37 -06:00
25 lines
428 B
PowerShell
25 lines
428 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
|
|
}
|