Has anyone been successful with creating script based discovery using MPAuthor?

I have created a very basic discovery script in PowerShell following the logic provided by Brian Wren in his training videos. It looks for a few folders in a directory and adds the name and path as property values.

The script executes without error on natively in Powershell and returns the desired properties within the XML generated. The agent will also execute the workflow without error after the management pack has been imported.

My issue is that nothing is discovered and the management server generates an error when it receives the discovery data from the agent in the operations manager event log:

Microsoft.EnterpriseManagement.Common.DiscoveryDataInvalidClassPropertyValueException,The class property value specified in the discovery data item is not valid. The value needs to adhere to the class.

Class property name: MPElement[Name=’MPAuthor.Classname’]/FolderPath$

Class property value: C:\foldername\childfolder

If I’m being honest I don’t really understand what this error means and google, so far hasn’t returned anything helpful.

Any help would be appreciated.


JohnnyK edited question
    • I'm not an MP dev, but this does sound as though there's a mismatch between how the data is saved on the client and how the management pack tells SCOM to read it. Have you confirmed that the XML that is saved is exactly as expected by the MP? i.e. if the class saved by the discovery on the client is DATA1, is SCOM expecting DATA2?