Hi @aditya dugyala ,
maybe this helps:
$a = ""
if ($a) {
Write-Output "variable contains value"
}
else {
Write-Output "variable is empty"
}
Or vice versa:
$a = ""
if (!$a) {
Write-Output "variable is empty"
}
else {
Write-Output "variable contains value"
}
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten