Private/Get-WinslopFixProcess.ps1

function Get-WinslopFixProcess {
    <#
    .SYNOPSIS
        Retrieves processes using raw .NET classes.
    .DESCRIPTION
        Wraps [System.Diagnostics.Process]::GetProcessesByName to bypass the
        high overhead and GC pressure of the Get-Process cmdlet.
        Abstracted into a function to allow Pester mocking during tests.
    #>

    [CmdletBinding()]
    [OutputType([System.Diagnostics.Process[]])]
    param(
        [Parameter(Mandatory)]
        [string]$ProcessName
    )

    process {
        [System.Diagnostics.Process]::GetProcessesByName($ProcessName)
    }
}