Here’s my summary of the problems with the NetworkAdapterCheck.vbs script in the Windows Server 2000 Operating System Management Pack för Operations Manager 2007 that is causing the failed to create System.PropertyBagData error i wrote about earlier.
This information in also available on https://connect.microsoft.com/feedback/ViewFeedback.aspx?FeedbackID=432627&SiteID=446
This “research” comes from getting an obscene amounts of Script or Executable Failed to run in the Operations Console. Each time it was the NetworkAdapterCheck.vbs script that could not create PropertyBagData. The error message copied from one of the alerts looks like this:
The process started at 14:29:26 failed to create System.PropertyBagData, no errors detected in the output. The process exited with 0
This error repeats almost as often as the script is scheduled to run and appears on almost every Windows 2000 server.
I am not really sure, but after a quite a bit of troubleshooting I am pretty sure it all boils down to a malformed WMI-query. What I basically did was to extract the script from the MP and dry-run it to see if I could find anything obvious, which I didn’t.
Since I didn’t have a good debugging too available, like in PrimalScript, I added the VBS equivalent of old-school printf debugging. I basically added
wscript.echo "Line XX:" & Err.Number
after each object/function call in the Main Sub.
The problem seems to be at line 118:
Set WMISet = WMIGetInstance("winmgmts:" + TargetComputer + "rootcimv2", query)
At line 119 I had a debug line that never executes and it would seem like the script is unable to process the query and exits without any error codes.
The query variable contains the following:
Win32_NetworkAdapter Where DeviceID='0' And ( NetConnectionStatus = '0' )
When I was debugging this I started the script like this:
cscript.exe /nologo "NetworkAdapterCheck.vbs" MASKED 0 false true false
I did find that if I change the parameters to this:
cscript.exe /nologo "NetworkAdapterCheck.vbs" MASKED 0 false false false
Then the script runs smoothly and produces an XML-output like this:
There’s quite the lot of similar errors posted on various forums on the internet but most of them ends up pointing towards the Antivirus Software as the perp and we have tried various exceptions on the server like excluding HealthExplorer.exe, MonitoringHost.exe and also the entire Health Service State folder with no improvement. But since I was able to run the scripts from other locations (not excluded) on the same server I find it hard to believe that the AV would be blocking it.