none
powershell import-fimconfig- How to set null value to a datetime attribute in FIM portal RRS feed

  • Question

  • I am running a powershell to clear out a datetime attribute in FIM portal. When $import-fimconfig is called, it is throwing the error "Attribute with value does not conform to a valid date time format. Here is the powershell snip. $attributeValue = $NULL. What am I missing?

    $importChange = New-Object Microsoft.ResourceManagement.Automation.ObjectModel.ImportChange
        $importChange.Operation = 2
        $importChange.AttributeName = $attributeName
        $importChange.AttributeValue = $attributeValue
        $importChange.FullyResolved = 1
        $importChange.Locale = "Invariant"
     

        $importObject = New-Object Microsoft.ResourceManagement.Automation.ObjectModel.ImportObject
        $importObject.ObjectType = $objectType
        $importObject.TargetObjectIdentifier = $objectID
        $importObject.SourceObjectIdentifier = $objectID
        $importObject.State = 1
        $importObject.Changes = (,$importChange)
        
        $importObject | Import-FIMConfig -uri $uri

    Tuesday, November 10, 2015 5:47 PM

All replies

  • Have you tried this instead https://lithnetrma.codeplex.com ? Way more simplified approach to do different things using PowerShell.
    Tuesday, November 10, 2015 8:12 PM
  • Hello - I looked through the web site and did not see an approach to clear a dateTime attribute.  

    Anyone?

    Thanks

    Wednesday, December 9, 2015 8:20 PM
  • How about this:

    Import-Module LithNetRMA
    Set-ResourceManagementClient -BaseAddress http://fimserver.domain.com:5725
    $resource = Get-Resource -ID <ID>
    $resource.dateTimeAttribute = @()
    Save-Resource $resource



    • Edited by Narcoticoo Thursday, December 10, 2015 5:37 AM
    Thursday, December 10, 2015 5:36 AM
  • I set a criteria to all those users and then used fim wal update resources - workflow activity to set the date attribute to null.
    Thursday, December 10, 2015 3:45 PM
  • so I guess FIM WAL is publicly available then?    can you point me to the link?
    Friday, December 11, 2015 12:07 AM
  • we got license for fim wal.
    Friday, December 11, 2015 3:09 PM
  • Have a look at http://fimactivitylibrary.codeplex.com/documentation and the Code Run activity. That can do what you want.

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

    Thursday, January 14, 2016 8:20 AM
  • MIM WAL can be found here: http://microsoft.github.io/MIMWAL

    It requires FIM 2010 R2 4.1.3496 or higher or MIM 2016.

    Best,

    Jeff Ingalls

    Saturday, January 16, 2016 12:12 AM