Resolve unreliable hardware-based heuristics by comparing $env:COMPUTERNAME with Win32_ComputerSystem to accurately identify local PowerShell sessions.