Hello,
Any help with the following error message would be greatly appreciated.
I'm getting this error when creating a new $dataobject in my powershell script that I'm using to populate a Dashboard Powershell grid. For the life of me, I can't figure out what the issue is from the error message which I'm catching in my powershell
script - I've included my schema object as well as the powershell call -
==========================
Please provide the following information to the support engineer if you have to contact Microsoft Help and Support :
Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderException: An error occurred executing the command: [Microsoft.EnterpriseManagement.Monitoring.DataProviders!PowershellProvider/ExecutePowershellDataSourceInitialScript] in provider: [Microsoft.EnterpriseManagement.Monitoring.DataProviders.PowershellProvider,
Microsoft.EnterpriseManagement.Monitoring.DataProviders, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35].We are getting an exception:
Exception calling "CreateInstance" with "1" argument(s): "xsd://Paul.MP.Test.Schema/Connections"
---> System.Management.Automation.RuntimeException: We are getting an exception: Exception calling "CreateInstance" with "1" argument(s): "xsd://Paul.MP.Test.Schema/Connections" ---> System.Management.Automation.RuntimeException:
We are getting an exception: Exception calling "CreateInstance" with "1" argument(s): "xsd://Paul.MP.Test.Schema/Connections" --- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.Monitoring.DataProviders.RetryCommandExecutionStrategy.Invoke(IDataProviderCommandMethodInvoker invoker)
at Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderCommandMethod.Invoke(CoreDataGateway gateWay, DataCommand command)
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderCommandMethod.Invoke(CoreDataGateway gateWay, DataCommand command)
at Microsoft.EnterpriseManagement.Presentation.DataAccess.CoreDataGateway.ExecuteScalarInternal[TResult](DataCommand command)
at Microsoft.EnterpriseManagement.Presentation.DataAccess.CoreDataGateway.<ExecuteScalarAsync>b__2[TResult](<>f__AnonymousType0`1 data)
==================
Schema
<ManagementPackFragment SchemaVersion="2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<TypeDefinitions>
<SchemaTypes>
<!-- In this section, you can use standard XSD notation to define your
own schema that can be used in ModuleType configuration, DataItem
type definitions, and for other uses in Operations Manager.
More information can be found in the Management Pack Development Kit:
http://msdn.microsoft.com/en-us/library/ee533587.aspx -->
<SchemaType ID="Paul.MP.Test.Schema" Accessibility="Public">
<!-- Please customize the schema definition to match your needs. -->
<xsd:complexType name="Connections" >
<xsd:sequence>
<!--xsd:element name="Id" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/-->
<xsd:element name="ConnectionName" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
</xsd:sequence>
</xsd:complexType>
</SchemaType>
</SchemaTypes>
</TypeDefinitions>
</ManagementPackFragment>
======================
Powershell call
$dataObject=$ScriptContext.CreateInstance("xsd://Paul.MP.Test.Schema/Connections")