SCOM Monitor not showing PropertyBag values

I have a script that is scraping a website and returning values from certain checks. When I run the script locally, it works as expected and the PropertyBag is displaying all the information as needed. I have confirmed that the information is correct, and I am passing in string values to make things simpler.

When I run the same script/monitor in SCOM, the values are not being populated. The keys are showing as expected as well in the property bag

Has anyone run into something similar and if so, what was the solution?

Hi

I realise this post is already 6 months old but if you are still having this issue, can you share any part of the script so that we can review and try and reproduce (I appreciate it might contain sensitive information and that you won’t be able to share any of it).

The first thing I would check is how you are passing the property bag back to SCOM.

For testing e.g. from VS Code, you use the VBscript syntax of $bag

For within the MP, you need to use $api.Return($bag)

Are you using the Community PowerShell MP to do this? If so, do you have any enhancement requests for the Community MP as we are looking to review this in the coming months.

Regards

Graham