FIM PowerShell Management Agent - the object reference not set to an instance of an object

Hi again

I just changed the objectClass in the import-script to "person" as well and the log still looks pretty much the same like before. Any other idea?

This would be the full log of a "Full Import" run on the MA:

07.09.2015 07:26:00: Enter InvokeBeginImportWorker->OpenImportConnection
07.09.2015 07:26:00: Getting schema
07.09.2015 07:26:00: Type: person
07.09.2015 07:26:00: Anchor attribute: id
07.09.2015 07:26:00: Attribute: sn
07.09.2015 07:26:00: Attribute: givenName
07.09.2015 07:26:00: Attribute: id
07.09.2015 07:26:00: Enter InvokeBeginImportWorker->OpenImportConnection->InitializeConfigParameters
07.09.2015 07:26:00: Password  (impersonate): *** secret ***
07.09.2015 07:26:00: Import Script: d:\daten\xml-agent\import.ps1
07.09.2015 07:26:00: Export Script: d:\daten\xml-agent\export.ps1
07.09.2015 07:26:00: Use paged import: 1
07.09.2015 07:26:00: Password Management Script: d:\daten\xml-agent\password.ps1
07.09.2015 07:26:00: Export simple objects: 1
07.09.2015 07:26:00: Schema Script: D:\daten\xml-agent\schema.ps1
07.09.2015 07:26:00: Username: 
07.09.2015 07:26:00: Domain (impersonate): 
07.09.2015 07:26:00: Username (impersonate): 
07.09.2015 07:26:00: Leave InvokeBeginImportWorker->OpenImportConnection->InitializeConfigParameters
07.09.2015 07:26:00: Should impersonate: False
07.09.2015 07:26:00: Enter InvokeBeginImportWorker->OpenImportConnection->OpenRunspace
07.09.2015 07:26:00: Runspace state: BeforeOpen
07.09.2015 07:26:00: Opening Runspace
07.09.2015 07:26:02: Leave InvokeBeginImportWorker->OpenImportConnection->OpenRunspace
07.09.2015 07:26:02: Resetting pipeline results and counters
07.09.2015 07:26:02: OpenImportRunStep Type: Full
07.09.2015 07:26:02: OpenImportRunStep Size: 100
07.09.2015 07:26:02: OpenImportRunStep CustomData: 
07.09.2015 07:26:02: Leave InvokeBeginImportWorker->OpenImportConnection
07.09.2015 07:26:02: Enter InvokeImportEntryWorker->GetImportEntries
07.09.2015 07:26:02: Setting custom data: 
07.09.2015 07:26:02: Setting page token: 
07.09.2015 07:26:02: Invoking import script: d:\daten\xml-agent\import.ps1
07.09.2015 07:26:02: Should impersonate: False
07.09.2015 07:26:03: Page token returned: ''
07.09.2015 07:26:03: Custom data returned: ''
07.09.2015 07:26:03: Object(s) in pipeline: 2
07.09.2015 07:26:03: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
07.09.2015 07:26:03: Leave InvokeImportEntryWorker->GetImportEntries
07.09.2015 07:26:03: Enter CloseImportConnection
07.09.2015 07:26:03: Enter CloseImportConnection->CloseRunspace
07.09.2015 07:26:03: Closing Runspace
07.09.2015 07:26:04: Leave CloseImportConnection
07.09.2015 07:26:04: CustomData: 
07.09.2015 07:26:04: Close reason: Normal
07.09.2015 07:26:04: Leave CloseImportConnection

Thanks
Raffael


September 7th, 2015 3:30am

Hello Raffael,

i give it a try in my demolab with you schema/import script and xml data file.

The PSMA imports all data fine in the connector space.

So I assume there is some problem around the connector. Hard to say what as the error message is not really saying much.

One think that came to my mind, did you set the ExecutionPolicy on that machine to:

Set-ExecutionPolicy RemoteSigned

This error came up if running scripts is not allowed on the machine (Policy=Resctricted).

/Peter

Free Windows Admin Tool Kit Click here and download it now
September 7th, 2015 4:16am

Hi Peter

I checked the execution-policy before and even tried unrestricted to no avail.

This is the error message in the Application eventlog:

 "Microsoft.MetadirectoryServices.ExtensibleExtensionException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei Granfeldt.PowerShellManagementAgent.GetImportEntries(GetImportEntriesRunStep importRunStep)
   bei Microsoft.MetadirectoryServices.Impl.ScriptHost.InvokeImportEntryWorker(ImportEntryArguments pArgs)
   bei Microsoft.MetadirectoryServices.Impl.ScriptHost.InvokeExtMA_ImportEntry(UInt32 cBatchSize, UInt16* pcszCustomData, UInt32 cFullObject, _OCTET* rgoctFullObject, UInt32* rgomodt, UInt32* pcpcszChangedAttributes, UInt16*** prgpcszChangedAttributes, Int32 fIsDNStyleNone, UInt16** ppszUpdatedCustomData, _OCTET* rgoctCSImage, Int32* rgextec, UInt16** rgpszErrorName, UInt16** rgpszErrorDetail, Int32* pfMoreToImport)Forefront Identity Manager 4.1.3613.0"

September 7th, 2015 4:39am

Hello Raffael,

then I'm runnning out of ideas right now, your implementation works perfectly on my demolab which is freshly installed with all current releases, Win2k12R2, MIMSync 4.3.1935 and current .Net 452 and Soren's PS MA 5.5.

So my only ideas are going in that way assuming version problems (just a shot in the dark).

Whats your implementation beside the FIM Version i see above ?

Maybe someone else has any idea ? (or maybe Soren will read this).

/Peter

Free Windows Admin Tool Kit Click here and download it now
September 7th, 2015 5:00am

Hi Peter

Win2012R2, .NET 4.5.1, and Soren's PS MA 5.5

Thanks for all your help already, gonna try to reinstall the PSMA and hopefully somebody else has an idea.

Thanks
Raffael

September 7th, 2015 5:11am

So, I just reinstalled the PSMA (again) and now it's working...

Thank you for your help Peter!

Free Windows Admin Tool Kit Click here and download it now
September 7th, 2015 5:38am

Hi There

I've been running into the following problem when trying to import from my Management Agent, based on Soren Granfeldt's PowerShell MA. In FIM it says "stopped-extensible-extension-error". 

The log contains the following text (and some more which I figured wasn't important for my issue):

07.09.2015 06:11:08: Invoking import script: d:\daten\xml-agent\import.ps1
07.09.2015 06:11:08: Should impersonate: False
07.09.2015 06:11:10: Page token returned: ''
07.09.2015 06:11:10: Custom data returned: ''
07.09.2015 06:11:10: Object(s) in pipeline: 2
07.09.2015 06:11:10: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
07.09.2015 06:11:10: Leave InvokeImportEntryWorker->GetImportEntries

Der Objektverweis wurde nicht auf eine Objektinstanz festelegt is German for "the object reference not set to an instance of an object"

This is  my import-script:

param 
(
	$Username = "",
	$Password = ""
)

[xml]$content = Get-Content -Encoding UTF8 -Path "D:\daten\XML-Agent\Export.xml"
$mitarbeiter = $content.SelectNodes("/Header/MITARBEITER_LISTE/item")


foreach ( $item in $mitarbeiter ){
    $name = $item.NAME
    $vorname = $item.VORNAME
    $persnr = $item.PERSONALNR
    
    
    $obj = @{}
    $obj.Add("id", "$persnr")
    $obj.Add("sn", "$name")
    $obj.Add("givenName", "$vorname")
	$obj.Add("objectClass","user")
    $obj
}

This is my schema-script:

$obj = New-Object -Type PSCustomObject
$obj | Add-Member -Type NoteProperty -Name "Anchor-id|String" -Value "123456"
$obj | Add-Member -Type NoteProperty -Name "objectClass|String" -Value "person"
$obj | Add-Member -Type NoteProperty -Name "givenName|String" -Value "Peter"
$obj | Add-Member -Type NoteProperty -Name "sn|String" -Value "Muster"
$obj

I will appreciate any advice to solve my problem.
Thanks


September 7th, 2015 6:14am

Hi again

I just changed the objectClass in the import-script to "person" as well and the log still looks pretty much the same like before. Any other idea?

This would be the full log of a "Full Import" run on the MA:

07.09.2015 07:26:00: Enter InvokeBeginImportWorker->OpenImportConnection
07.09.2015 07:26:00: Getting schema
07.09.2015 07:26:00: Type: person
07.09.2015 07:26:00: Anchor attribute: id
07.09.2015 07:26:00: Attribute: sn
07.09.2015 07:26:00: Attribute: givenName
07.09.2015 07:26:00: Attribute: id
07.09.2015 07:26:00: Enter InvokeBeginImportWorker->OpenImportConnection->InitializeConfigParameters
07.09.2015 07:26:00: Password  (impersonate): *** secret ***
07.09.2015 07:26:00: Import Script: d:\daten\xml-agent\import.ps1
07.09.2015 07:26:00: Export Script: d:\daten\xml-agent\export.ps1
07.09.2015 07:26:00: Use paged import: 1
07.09.2015 07:26:00: Password Management Script: d:\daten\xml-agent\password.ps1
07.09.2015 07:26:00: Export simple objects: 1
07.09.2015 07:26:00: Schema Script: D:\daten\xml-agent\schema.ps1
07.09.2015 07:26:00: Username: 
07.09.2015 07:26:00: Domain (impersonate): 
07.09.2015 07:26:00: Username (impersonate): 
07.09.2015 07:26:00: Leave InvokeBeginImportWorker->OpenImportConnection->InitializeConfigParameters
07.09.2015 07:26:00: Should impersonate: False
07.09.2015 07:26:00: Enter InvokeBeginImportWorker->OpenImportConnection->OpenRunspace
07.09.2015 07:26:00: Runspace state: BeforeOpen
07.09.2015 07:26:00: Opening Runspace
07.09.2015 07:26:02: Leave InvokeBeginImportWorker->OpenImportConnection->OpenRunspace
07.09.2015 07:26:02: Resetting pipeline results and counters
07.09.2015 07:26:02: OpenImportRunStep Type: Full
07.09.2015 07:26:02: OpenImportRunStep Size: 100
07.09.2015 07:26:02: OpenImportRunStep CustomData: 
07.09.2015 07:26:02: Leave InvokeBeginImportWorker->OpenImportConnection
07.09.2015 07:26:02: Enter InvokeImportEntryWorker->GetImportEntries
07.09.2015 07:26:02: Setting custom data: 
07.09.2015 07:26:02: Setting page token: 
07.09.2015 07:26:02: Invoking import script: d:\daten\xml-agent\import.ps1
07.09.2015 07:26:02: Should impersonate: False
07.09.2015 07:26:03: Page token returned: ''
07.09.2015 07:26:03: Custom data returned: ''
07.09.2015 07:26:03: Object(s) in pipeline: 2
07.09.2015 07:26:03: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
07.09.2015 07:26:03: Leave InvokeImportEntryWorker->GetImportEntries
07.09.2015 07:26:03: Enter CloseImportConnection
07.09.2015 07:26:03: Enter CloseImportConnection->CloseRunspace
07.09.2015 07:26:03: Closing Runspace
07.09.2015 07:26:04: Leave CloseImportConnection
07.09.2015 07:26:04: CustomData: 
07.09.2015 07:26:04: Close reason: Normal
07.09.2015 07:26:04: Leave CloseImportConnection

Thanks
Raffael


Free Windows Admin Tool Kit Click here and download it now
September 7th, 2015 7:28am

So, I just reinstalled the PSMA (again) and now it's working...

Thank you for your help Peter!

September 7th, 2015 9:36am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics