I have a script that pulls WmI volume info. I have this in a try/catch. When the wmi fails, which it should for one server, the catch does not catch it. No error is generated with the Catch. NOTHING.
All other 110 exeuctions work perfectly.
I also added -ErrorAction Stop and it does not pickup a failure either.
There is nothing wrong with the try/catch, it picks up other errors just fine.
$results = @(Get-WmiObject -Query $mySelect -ComputerName $myServerIP | Select-Object Capacity, Caption, FreeSpace, Label, Name, SystemName, SystemVolume)