Try Catch not working in Powershell Script
I modified your function param a little bit , but for your answer , I have to say since you are using notlike your get-wmiobject is not returning any error. If data is not there also , it will show you blank. You can narrow down the issue by putting the output in the variable…