Hi All,
When I try to connect AD via Powershell MA I am getting below error
The extensible extension returned an unsupported error.
The stack trace is:
"System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.IdentityManagement.Connector.PowerShell.Bridge.ConfigBridge.GetSchema()
Forefront Identity Manager 4.1.3441.0"
I get this error with both impersonation and without it.What is the access required for the impersonated account or the FIM Sync account without impersonation.Below Schema file works in other environment but not in one.
Schema File
[CmdletBinding()]
param(
[System.Collections.ObjectModel.KeyedCollection[[string],[Microsoft.MetadirectoryServices.ConfigParameter]]]$ConfigParameters,
[System.Management.Automation.PSCredential]$PSCredential
)
Function LogWrite
{
Param ([string]$logstring)
Add-content $Logfile -value $logstring
}
$Logfile = "C:\Temp\SchemaLog.txt"
Set-StrictMode -Version 3
LogWrite "Start"
Import-Module (Join-Path -Path ([Environment]::GetEnvironmentVariable('TEMP', [EnvironmentVariableTarget]::Machine)) -ChildPath 'FIM.MTAD.psm1') -Verbose:$false
LogWrite "Import module"
$Schema = New-FIMSchema
LogWrite "Setup user schema"
$SchemaType = New-FIMSchemaType -Name 'user'
$SchemaType | Add-FIMSchemaAttribute -Name 'distinguishedName' -Anchor -DataType 'String' -SupportedOperation ImportOnly
$SchemaType | Add-FIMSchemaAttribute -Name 'sAMAccountName' -DataType 'String' -SupportedOperation ImportOnly
$SchemaType | Add-FIMSchemaAttribute -Name 'name' -DataType 'String' -SupportedOperation ImportOnly
$Schema.Types.Add($SchemaType)
LogWrite "Setup group schema"
$SchemaType = New-FIMSchemaType -Name 'group'
$SchemaType | Add-FIMSchemaAttribute -Name 'distinguishedName' -Anchor -DataType 'String' -SupportedOperation ImportOnly
$SchemaType | Add-FIMSchemaAttribute -Name 'sAMAccountName' -DataType 'String' -SupportedOperation ImportOnly
$SchemaType | Add-FIMSchemaAttribute -Name 'name' -DataType 'String' -SupportedOperation ImportOnly
$SchemaType | Add-FIMSchemaAttribute -Name 'Members' -DataType 'Reference' -MultiValued -SupportedOperation ImportExport
$Schema.Types.Add($SchemaType)
LogWrite "Setup computer schema"
$SchemaType = New-FIMSchemaType -Name 'computer'
$SchemaType | Add-FIMSchemaAttribute -Name 'distinguishedName' -Anchor -DataType 'String' -SupportedOperation ImportOnly
$SchemaType | Add-FIMSchemaAttribute -Name 'sAMAccountName' -DataType 'String' -SupportedOperation ImportOnly
$SchemaType | Add-FIMSchemaAttribute -Name 'name' -DataType 'String' -SupportedOperation ImportOnly
$Schema.Types.Add($SchemaType)
$Schema