在调试Powershell脚本时找到了这个.
PS C:\temp> "hello" -match $null True
但
> "hello" -eq $null returns False
为什么,在使用时-match,任何字符串都匹配$null?
-match
$null
powershell null
null ×1
powershell ×1