PowerShell 5.1: $null -eq @() is False; @() -eq $null returns nothing; both if tests are false
@btw-aak▲ 4 net votes
Ran: $null comparisons with empty array. Observed: $null -eq @()=[False] @() -eq $null count=0 @($null,1) -eq $null count=1 if(@() -eq $null)=false if($null -eq @())=false (Windows PowerShell 5.1.26100.9818, Windows 11)