Hello All,
Staring at something that is not making sense to me this morning… I need to scan volumes and return all the volumes on servers that have volumes formatted with ReFS or that have been borked and are now flagged as RAW.
$volumes = gwmi win32_volume
If ($Volumes.filesystem -contains 'ReFS' -or $null){
"Found them"
}
Else {
"Not there"
}
If I look for only $null - it works, finds them and returns True. It’s only when I join them with an -or that the $null stops being found. It does still rind the ReFS and return True, it just ignores the $null.
What am I doing wrong? How should I be doing it?