none
PowerShell MA: problems exporting RRS feed

  • Question

  • I'm really hoping to be able to use Soren Granfeldt's Powershell MA to do some new integrations with FIM, but am having some difficulties.  My latest problem is that I get an ma.extension error, which dumps the following stack trace in the Application event log:

     "System.NullReferenceException: Object reference not set to an instance of an object.
       at Granfeldt.PowerShellManagementAgent.Microsoft.MetadirectoryServices.IMAExtensible2CallExport.PutExportEntries(IList`1 csentries)
    Forefront Identity Manager 4.1.3613.0"

    The only thing it's trying to export right now is a change of e-mail address on a user it's done a join for (I've only got my sync rule applied to one person at the moment), so I wouldn't think it would be a provisioning problem?  I've commented out the majority of my code in my export script so I'm reasonably certain it's not a PS code problem.

    Sync rule:

    firstName -> first_name
    lastName -> last_name
    mail -> email
    [init flow only] LowerCase(accountName)+"@uwrf.edu" -> username
    [init flow only] LowerCase(accountName)+"@uwrf.edu" -> dn

    I'm excited about the possibilities, but frustrated.  I'd be happy to post additional details but I'm not sure what would be helpful.

    -Robert

    Tuesday, November 17, 2015 5:11 PM

All replies

  • Sörens Powershell MA has worked well for us.

    Try enabling logging on the Powershell agent, and see if that gets you anywhere:

    http://blog.goverco.com/p/psmalogging.html

    Also:

    http://blog.goverco.com/p/psmatroubleshooting.html


    Did my post help? Please use "Vote As Helpful", "Mark as answer" or "Propose as answer". Thank you!

    Wednesday, November 18, 2015 7:25 AM
  • Enabling login doesn't appear to have any effect.  I've tried a couple of different file paths without any files being created.  I didn't have any results with DebugView either, but I may be using that wrong.
    Wednesday, November 18, 2015 3:23 PM
  • Did you create the eventlog source as stated in the installation guide(http://blog.goverco.com/p/psmainstall.html)?

    New-EventLog -Source "PowerShell Management Agent" -LogName Application

    You should be able to get information in DebugView if you setup it up as described in the link above. Remember to enabel Capture Global Win32 and to run it with administrative privileges.

    I'm of course assuming that you're using the latest version? Also, in your scripts you can add write-debug, write-verbose etc and have that information go to the trace windos.


    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

    Monday, December 7, 2015 6:18 PM
  • Did you resolve this issue?

    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

    Wednesday, December 16, 2015 9:04 PM
  • DebugView didn't really provide any more information than the event log.  I'm still getting the "object reference not set to an instance of an object".  My export script doesn't really do much of anything at the moment as the majority of it is commented out.  I'm thinking this is more of a FIM problem than a PowerShell MA problem, but I don't understand why the error is occurring (and please forgive basic "new MA" errors as I don't do this often).  I have a flow to a DN attribute and my anchor attribute.

    Robert

    Wednesday, December 16, 2015 10:16 PM
  • Could you try a few things?

    1) Check that you have created the EventLog Source for the PowerShell MA?
    2) Send whatever output you may have from DebugView when doing export

    3) Maybe try creating a fresh MA to see it that works and that it is not some funky error in the one you are using currently.

    Thanks


    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

    Thursday, December 17, 2015 7:53 AM
  • Did you ever find a resolution to this error? I am getting the same thing. When i run an export as well.
    System.NullReferenceException:
    Object reference not set to an instance of an object. at
    Granfeldt.PowerShellManagementAgent.Microsoft.MetadirectoryServices.IMAExtensible2CallExport.PutExportEntries(IList`1
    csentries) Forefront Identity Manager 4.1.3613.0
    Friday, August 5, 2016 3:27 AM
  • Could you post any output from DebugView and any errors that you have in the Application eventlog? To use DebugView with this MA, have a look here https://psma.codeplex.com/wikipage?title=Logging&referringTitle=Documentation

    If you don't have any output at all, I'm not sure that this is an MA problem, but more a problem with FIM/MIM it self.

    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

    Friday, August 5, 2016 5:07 AM