How to create MS/ Use Schema Script

Oct 21, 2016 at 7:18 PM
When I attempt to provide the schema script in the Connectivity Section for creating the PowerShell management agent I receive the following error:

Unable to retrieve schema. Error: Exception from HRESULT: 0x80231343.

I made sure that my schema file is saved in the expected path that I put in the schema script textbox (c:\admin\scripts\schema.ps1).

I also provide the username, password, as well for the account I would like to use.

This is the code currently in my schema script:
new-object -typename psobject -prop @{
"Anchor-id|string" = ""
"objectclass|string" = "user"
"accountName|string" = ""
"pwdexpireinfo|integer" = 1
}
I even took this code and ran PowerShell as the user which is going to be configured to use the PowerShell management agent and it works successfully without permission issues.

The error I am seeing in the event logs for the FIMSynchronizationService is:


Error: The extensible extension returned an unsupported error.
The stack trace is:

"Microsoft.MetadirectoryServices.ExtensibleExtensionException: Object reference not set to an instance of an object.at Granfeldt.PowerShellManagementAgent.Microsoft.MetadirectoryServices.IMAExtensible2GetSchema.GetSchema(KeyedCollection`2 configParameters)
Forefront Identity Manager 4.3.1935.0"

The warning that I receive for the PowerShell management agent source is:

Object reference not set to an instance of an object.


Is there something I am missing or something I am doing wrong to configure this?

The build I currently have for PowerShell management Agent: 5.5
The build of MIM I have is 4.3.1935.0