I want to check whether a powershell object contains any null values. If it does, then it should return a $true
For example
$tags=@{'Artist'='Madonna';`
'Title'='Like a Prayer';`
'Genre'=$null; }
How can I test that $tags contains a null value?
$tags.ContainsValue($null)but I'll assume you're also looking to check if it contains an empty string and I'll also assume, since you're talking about a powershell obejct,$tagsis not actually a hashtable but apscustomobjectinstead.