Back to articles
February 13, 2025

Powershell string check for null or empty

if([string]::IsNullOrEmpty($VERSION)){
  Write-Host "No NSM Version Found" $installType='new install'
}
$VERSION 
  -notmatch "\S" > $null  
  -notmatch "\S" True > "   "  
  -notmatch "\S" True > " x "  
  -notmatch "\S" False
Loading comments...