nie zerowa sprawdza w zmiennej PowerShell

if (!$variablename) { Write-Host "variable is null" }
if ($variablename) { Write-Host "variable is NOT null" }
Fancy Flatworm