Public/Test-Process.ps1

function Test-Process
{
    <#
        .DESCRIPTION
            Test if a process is currently running
    
        .PARAMETER Name
            The name of the process to check for
    
        .EXAMPLE
            $ProcessStatus = Test-Process -Name notepad
    
        .NOTES
            Created by: Jon Anderson
            Modified: 2023-07-10
    #>

    [CmdletBinding()]
    param(
        [parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]
        [String]$Name
    )

    $ProcessExists = Get-Process -Name $Name -ErrorAction SilentlyContinue
    if($ProcessExists)
    {
        return $true
    }
    else
    {
        return $false
    }
}