SyntaxFix
Write A Post
Hire A Developer
Questions
if (!$variablename) { Write-Host "variable is null" }
I hope this simple answer will is resolve the question. Source