IdentityManager.PoSh

Hi 

I don't see any open topic for IdentityManager.PoSh hence I open this one.

Can you please show some example how to run a custom event which is having a custom variable in the jobchain's generating condition.

Basically I have a problem in running ADSAccount UPDATE event with custom variable...

Parents
  • Do you mean a parameter set in the parameter collection and used by $PC(ParameterName)$ in the process?

  • okay, I think I have misunderstood the concept of Invoke-ImEvent cmdlet. 

    I was trying to run ADSAccount update event with some value i.e Surname while having a gen condition FULLSYNC = FALSE and CUSTOMVARIABLE = TRUE. 

    So now, instead of running Invoke-ImEvent I've ran SET cmdlet with session variables.

    Sample code:

    # Get the session
    $sessionToUse = $Global:imsessions[$Global:imsessions.Keys[0]].Session

    # Add variable

    $sessionToUse.Variables.Put('FULLSYNC', $false)
    $sessionToUse.Variables.Put('CUSTOMVARIABLE', $true)

    # Query a variable
    $sessionToUse.Variables['FULLSYNC']
    $sessionToUse.Variables['CUSTOMVARIABLE']

    # Run Command
    Set-Entity -Type ADSAccount -Identity "6h27ef73-a13f-40eb-a7a3-2f49e487e5g2" -Properties @{'Surname' = 'Schmidt'}

    # Remove a variable
    $sessionToUse.Variables.Remove('FULLSYNC')
    $sessionToUse.Variables.Remove('CUSTOMVARIABLE')

    # Query a variable
    $sessionToUse.Variables['FULLSYNC']
    $sessionToUse.Variables['CUSTOMVARIABLE']

    Regarding $PC(ParameterName)$ can I run

    Invoke-ImEvent  -EventName "EVENT" -Identity "UID" -Type "TABLE" -EventParameters @{"paramName":"paramValue"} ?

Reply
  • okay, I think I have misunderstood the concept of Invoke-ImEvent cmdlet. 

    I was trying to run ADSAccount update event with some value i.e Surname while having a gen condition FULLSYNC = FALSE and CUSTOMVARIABLE = TRUE. 

    So now, instead of running Invoke-ImEvent I've ran SET cmdlet with session variables.

    Sample code:

    # Get the session
    $sessionToUse = $Global:imsessions[$Global:imsessions.Keys[0]].Session

    # Add variable

    $sessionToUse.Variables.Put('FULLSYNC', $false)
    $sessionToUse.Variables.Put('CUSTOMVARIABLE', $true)

    # Query a variable
    $sessionToUse.Variables['FULLSYNC']
    $sessionToUse.Variables['CUSTOMVARIABLE']

    # Run Command
    Set-Entity -Type ADSAccount -Identity "6h27ef73-a13f-40eb-a7a3-2f49e487e5g2" -Properties @{'Surname' = 'Schmidt'}

    # Remove a variable
    $sessionToUse.Variables.Remove('FULLSYNC')
    $sessionToUse.Variables.Remove('CUSTOMVARIABLE')

    # Query a variable
    $sessionToUse.Variables['FULLSYNC']
    $sessionToUse.Variables['CUSTOMVARIABLE']

    Regarding $PC(ParameterName)$ can I run

    Invoke-ImEvent  -EventName "EVENT" -Identity "UID" -Type "TABLE" -EventParameters @{"paramName":"paramValue"} ?

Children