How can I check if a string is null or empty in PowerShell?
You guys are making this too hard. PowerShell handles this quite elegantly e.g.: > $str1 = $null > if ($str1) { ‘not empty’ } else { ’empty’ } empty > $str2 = ” > if ($str2) { ‘not empty’ } else { ’empty’ } empty > $str3 = ‘ ‘ > if ($str3) { ‘not … Read more