Quantcast
Channel: Forum Microsoft Identity Manager
Viewing all articles
Browse latest Browse all 4767

MIM Powershell Management Agent Error in "End Import" Script

$
0
0

I migrate my Powershell Management Agent from an older Version and get an error in the "End Import" script part.
The script run successfully in Version:
FIM Powershell Management Agent Version 4.3.1082.0

Now I tried these versions:
MIM Powershell Management Agent Version 1.1.830.0 and Version 1.1.8610

The script is quit simple
[CmdletBinding()]           
param(               
    [Microsoft.MetadirectoryServices.ConfigParameterKeyedCollection]    
    $ConfigParameters,
   
    #[ValidateNotNull()]           
    [Microsoft.MetadirectoryServices.OpenImportConnectionRunStep] $OpenImportConnectionRunStep, 

    #[ValidateNotNull()]           
    [Microsoft.MetadirectoryServices.CloseImportConnectionRunStep] $CloseImportConnectionRunStep,         
               
    [PSCredential] $PSCredential,           
           
    [string]
    $scriptDir = [Microsoft.MetadirectoryServices.MAUtils]::MAFolder            
)

$result = (New-Object Microsoft.MetadirectoryServices.CloseImportConnectionResults)
$result.CustomData = "My custom data"
Write-Output $result

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

 "Microsoft.MetadirectoryServices.ExtensionException: The following exception occurred while executing the PowerShell commands: System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.IdentityManagement.Connector.PowerShell.Engine.PowerShellRuntime.InvokePowerShell(PSCommand command)
   at Microsoft.IdentityManagement.Connector.PowerShell.Engine.PowerShellRuntime.InvokePowerShell(PSCommand command)
   at Microsoft.IdentityManagement.Connector.PowerShell.Engine.PowerShellContext.ExecuteScript(List`1 commandParameters, String scriptFilePath, Boolean enableSetLocation)
   at Microsoft.IdentityManagement.Connector.PowerShell.Bridge.ImportBridge.GetCloseImportConnectionResult(String scriptFileConfigKey, CloseImportConnectionRunStep closeImportRunStep)
Forefront Identity Manager 4.5.202.0"


If I do not use a script in "End Import" at all the sync runs without error. But I need this step to set additional information in the CustomData field.

Any help is appreciated
Henry.



Viewing all articles
Browse latest Browse all 4767

Trending Articles