PowerShell - Cross-Platform PowerShell
This script is intended to run on Windows and Linux but uses a Windows-only environment variable. What is the problem?
if ($env:OS -eq 'Windows_NT') { Write-Host 'Windows' } else { Write-Host 'Linux or macOS' }