This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

UNSAccountB process is not firing for INSERT events for Provisioning using Powershell Connector

Hi,

I want to Create Active Directory Accounts using the Powershell Connector with the OOB AD Sample.xml definition file in my Sync Editor Project.

Right now I'm able to execute the Full Sync, so the AD Accounts are under UNSAccountB but I can't Provisioning new acccounts to the Target System.

I've created a new custom UNSAccountB process for INSERT events and it's not being fired. When I run the Simulation in Designer the Process Step says "Not Generated".

Here's the Pre-Script for Generating and Generating Conditions:

The process step is a process task Projector Component - AdHocProjection with the Following Properties:

Also I've setup the provisioning process operation in order to execute the Sync Workflow for Provisioning:

 

I appreciate any help!

Thanks

Parents
  • Thanks again Markus.

    Here's my xml definition file, Can you take a look at it? probably there's something wrong with the definition file because after this my Sync Editor tool crash....


    <?xml version="1.0" encoding="utf-8" ?>
    <!--
    Some header data definint the id, the version and the description of this connector
    -->
    <PowershellConnectorDefinition Id="SamplePowershellConnector" Version="1.0" Description="Sample Powershell Connector">

    <!--
    Include plugin libraries for custom conversions
    Custom converters can contain code to:
    1. Convert output of a commandlet to a connector value (see IPSObjectValueConverter interface)
    2. Convert connector values/modifications to cmdlet parameters (see IPSParameterConverter interface)
    -->
    <PluginAssemblies>
    <!--<Assembly Path="VI.Projector.Exchange.Common.dll" />-->
    </PluginAssemblies>

    <!--
    Define connection parameters that shall be queried from the user when
    creating a new connection. Set the IsSensibleData attribute to true for passwords etc.
    -->
    <!--<ConnectionParameters>
    <ConnectionParameter Name="ComputerName" Description="TargetServer" />
    <ConnectionParameter Name="Name" Description="Account" />
    <ConnectionParameter Name="Description" Description="Comments" />
    </ConnectionParameters>-->

    <!--
    The initialization section contains all settings that are used for setting
    up the runtime powershell session.
    -->
    <Initialization>
    <!--
    Specify custom script commandlets. Those commandlets are available throughout the whole
    powershell session of the connector and can be used like regular commands
    -->
    <CustomCommands>
    <CustomCommand Name="Connect-Session">
    <![CDATA[
    $idm = "init"
    ]]>
    </CustomCommand>
    <CustomCommand Name="Create-LocalAccount">
    <![CDATA[
    Invoke-Command -ComputerName "2012r2std" -ScriptBlock {New-LocalUser -Name "Test104" -Description "Description" -NoPassword}
    ]]>
    </CustomCommand>
    <CustomCommand Name="Get-LocalAccounts">
    <![CDATA[
    Invoke-Command -ComputerName "2012r2std" -ScriptBlock {Get-WmiObject -Class Win32_UserAccount -Filter "LocalAccount=True"}
    ]]>
    </CustomCommand>
    <CustomCommand Name="Exit-Session">
    <![CDATA[
    exit
    ]]>
    </CustomCommand>

    </CustomCommands>

    <!--
    List of all commands that are mapped in the schema types. This can either be built-in powershell commandlets
    or commandlets that are loaded from modules, remote sessions or snapins. If you import sessions or modules using the
    prefix parameter, you need to specify the commands including the prefix i.e. Get-PrefixADUser
    -->
    <PredefinedCommands>
    <Command Name="Invoke-Command" />
    <Command Name="New-LocalUser" />
    </PredefinedCommands>

    <!--
    The following section contains the sequence of commands, that are executed when ...
    ... the powershell session is established (connect)
    ... the powershell session is closed (disconnect)
    -->

    <EnvironmentInitialization>
    <!--
    Commands to be executed when the powershell runspace is created
    -->
    <Connect>
    <!--
    A commandsequence contains 1 to n commands that are executed successively. They do not
    share a common pipeline which means that the output of one command is not available to
    the successive command. The commands are executed in the order specified by the "Order"
    attribute.
    -->
    <CommandSequence>
    <Item Command="Connect-Session" Order="1">
    <!--
    A "SetParameter" is one way to pass parameter values to a powershell command.
    Attributes:
    "Param" = contains the target Parameter
    "Source" = the source for the value. Available sources are
    "ConnectionParameter" ... value is taken from a passed connection parameter)
    "FixedValue" ... a fixed value
    "FixedArray" ... a fixed array of values
    "SwitchParameter" ... a Powershell switch Parameter
    "GlobalVariable" ... value of a global variable
    "Value" = meaning depends on "Source"
    if source is "ConnectionParameter" then "Value" contains the name of the connection parameter
    if source is "SwitchParameter" then "Value" can be omitted/has no effect
    if source is "FixedValue" then "Value" contains a fixed value
    if source is "FixedArray" then "Value" contains a comma seperated list of elements that are passed as an array
    if source is "GlobalVariable" then "Value" contains the name of the variable to use.
    To set a global variable use $global:<name> = <value>

    Another way to map parameters are described in the Schema section

    -->
    <!--<SetParameter Param="ComputerName" Source="ConnectionParameter" Value="ComputerName" />
    <SetParameter Param="Name" Source="ConnectionParameter" Value="Name" />
    <SetParameter Param="Description" Source="ConnectionParameter" Value="Description" />-->
    </Item>
    </CommandSequence>
    </Connect>

    <!--
    Commands to be executed when the runspace is closed (free resources etc.)
    -->
    <Disconnect>
    <CommandSequence>
    <Item Command="Exit-Session" Order="1" />
    </CommandSequence>
    </Disconnect>

    </EnvironmentInitialization>
    </Initialization>

    <!--
    The Schema section describes how commandlet input/output is mapped to schema types
    -->
    <Schema>
    <!--
    Definition of a schema class 'user'
    -->
    <Class Name="User">
    <!--
    Definition of Properties, at least one property needs to be marked as IsUniqueKey.
    -->
    <Properties>

    <!--
    A Property element contains the definition of Schema property.
    Attributes:
    "Name" = The name of the property
    "DataType" = The data type (valid values are String, Int, Bool, DateTime)
    "IsUniqueKey" = indicates, that the property can be used to identify an object instance
    "IsMandatory" = indicates, that the property is mandatory
    "IsAutofill" = indicates, that the value of this property is created by the system
    "IsDisplay" = indicates, that the value of this property is used as a display
    "IsRevision" = indicates, that the value of this property is used as revision
    -->

    <Property Name="Name" DataType="String" IsUniqueKey="true" IsMandatory="true" IsAutoFill="true">
    <ReturnBindings>
    <Bind CommandResultOf="Get-LocalAccounts" Path="Name" />
    </ReturnBindings>
    <CommandMappings>
    <Map ToCommand="Create-LocalAccount"/>
    </CommandMappings>
    </Property>

    <Property Name="Description" DataType="String">
    <ReturnBindings>
    <Bind CommandResultOf="Get-LocalAccounts" Path="Description" />
    </ReturnBindings>
    <CommandMappings>
    <Map ToCommand="Create-LocalAccount"/>
    </CommandMappings>
    </Property>

    </Properties>

    <!--
    The read configuration is mandatory. It defines the ListingCommand which is used to pull
    a list of all objects of this type from the system. Furthermore, the additional commandsequence
    defines the list of commands, that need to be executed to fully load a single object with all
    properties defined in the schema
    -->
    <ReadConfiguration>
    <ListingCommand Command="Get-LocalAccounts">
    <SetParameter Param="Filter" Source="FixedValue" Value="*" />
    <SetParameter Param="Properties" Source="FixedArray" Value="Name" />
    </ListingCommand>
    <CommandSequence>
    <Item Command="Get-LocalAccounts" Order="1" >
    <SetParameter Param="Properties" Source="FixedArray" Value="Name,AccountType,Description,Domain" />
    </Item>
    </CommandSequence>
    </ReadConfiguration>


    <!--
    The MethodConfiguration section describes all methods that are available for this class. In order to stay compatible with
    the D1IM Projector, you schould use the name
    - Insert -> Commands that create a new object
    - Update -> Commands that modify an exisiting object
    - Delete -> Commands that delete an exisiting object
    -->
    <MethodConfiguration>
    <!--Define a method named "Insert"-->
    <Method Name="Insert">
    <!--An "Insert" consists of the following command calls-->
    <CommandSequence>
    <Item Command="Create-LocalAccount" Order="1">
    <SetParameter Param="PassThru" Source="SwitchParameter" Value="" />
    </Item>
    <!--
    The Condition "ModificationExisits" causes, that this command is only executed,
    if one or more propert(ies) were set, that are written by this command.
    -->
    </CommandSequence>
    </Method>
    </MethodConfiguration>
    </Class>
    </Schema>

    </PowershellConnectorDefinition>
Reply
  • Thanks again Markus.

    Here's my xml definition file, Can you take a look at it? probably there's something wrong with the definition file because after this my Sync Editor tool crash....


    <?xml version="1.0" encoding="utf-8" ?>
    <!--
    Some header data definint the id, the version and the description of this connector
    -->
    <PowershellConnectorDefinition Id="SamplePowershellConnector" Version="1.0" Description="Sample Powershell Connector">

    <!--
    Include plugin libraries for custom conversions
    Custom converters can contain code to:
    1. Convert output of a commandlet to a connector value (see IPSObjectValueConverter interface)
    2. Convert connector values/modifications to cmdlet parameters (see IPSParameterConverter interface)
    -->
    <PluginAssemblies>
    <!--<Assembly Path="VI.Projector.Exchange.Common.dll" />-->
    </PluginAssemblies>

    <!--
    Define connection parameters that shall be queried from the user when
    creating a new connection. Set the IsSensibleData attribute to true for passwords etc.
    -->
    <!--<ConnectionParameters>
    <ConnectionParameter Name="ComputerName" Description="TargetServer" />
    <ConnectionParameter Name="Name" Description="Account" />
    <ConnectionParameter Name="Description" Description="Comments" />
    </ConnectionParameters>-->

    <!--
    The initialization section contains all settings that are used for setting
    up the runtime powershell session.
    -->
    <Initialization>
    <!--
    Specify custom script commandlets. Those commandlets are available throughout the whole
    powershell session of the connector and can be used like regular commands
    -->
    <CustomCommands>
    <CustomCommand Name="Connect-Session">
    <![CDATA[
    $idm = "init"
    ]]>
    </CustomCommand>
    <CustomCommand Name="Create-LocalAccount">
    <![CDATA[
    Invoke-Command -ComputerName "2012r2std" -ScriptBlock {New-LocalUser -Name "Test104" -Description "Description" -NoPassword}
    ]]>
    </CustomCommand>
    <CustomCommand Name="Get-LocalAccounts">
    <![CDATA[
    Invoke-Command -ComputerName "2012r2std" -ScriptBlock {Get-WmiObject -Class Win32_UserAccount -Filter "LocalAccount=True"}
    ]]>
    </CustomCommand>
    <CustomCommand Name="Exit-Session">
    <![CDATA[
    exit
    ]]>
    </CustomCommand>

    </CustomCommands>

    <!--
    List of all commands that are mapped in the schema types. This can either be built-in powershell commandlets
    or commandlets that are loaded from modules, remote sessions or snapins. If you import sessions or modules using the
    prefix parameter, you need to specify the commands including the prefix i.e. Get-PrefixADUser
    -->
    <PredefinedCommands>
    <Command Name="Invoke-Command" />
    <Command Name="New-LocalUser" />
    </PredefinedCommands>

    <!--
    The following section contains the sequence of commands, that are executed when ...
    ... the powershell session is established (connect)
    ... the powershell session is closed (disconnect)
    -->

    <EnvironmentInitialization>
    <!--
    Commands to be executed when the powershell runspace is created
    -->
    <Connect>
    <!--
    A commandsequence contains 1 to n commands that are executed successively. They do not
    share a common pipeline which means that the output of one command is not available to
    the successive command. The commands are executed in the order specified by the "Order"
    attribute.
    -->
    <CommandSequence>
    <Item Command="Connect-Session" Order="1">
    <!--
    A "SetParameter" is one way to pass parameter values to a powershell command.
    Attributes:
    "Param" = contains the target Parameter
    "Source" = the source for the value. Available sources are
    "ConnectionParameter" ... value is taken from a passed connection parameter)
    "FixedValue" ... a fixed value
    "FixedArray" ... a fixed array of values
    "SwitchParameter" ... a Powershell switch Parameter
    "GlobalVariable" ... value of a global variable
    "Value" = meaning depends on "Source"
    if source is "ConnectionParameter" then "Value" contains the name of the connection parameter
    if source is "SwitchParameter" then "Value" can be omitted/has no effect
    if source is "FixedValue" then "Value" contains a fixed value
    if source is "FixedArray" then "Value" contains a comma seperated list of elements that are passed as an array
    if source is "GlobalVariable" then "Value" contains the name of the variable to use.
    To set a global variable use $global:<name> = <value>

    Another way to map parameters are described in the Schema section

    -->
    <!--<SetParameter Param="ComputerName" Source="ConnectionParameter" Value="ComputerName" />
    <SetParameter Param="Name" Source="ConnectionParameter" Value="Name" />
    <SetParameter Param="Description" Source="ConnectionParameter" Value="Description" />-->
    </Item>
    </CommandSequence>
    </Connect>

    <!--
    Commands to be executed when the runspace is closed (free resources etc.)
    -->
    <Disconnect>
    <CommandSequence>
    <Item Command="Exit-Session" Order="1" />
    </CommandSequence>
    </Disconnect>

    </EnvironmentInitialization>
    </Initialization>

    <!--
    The Schema section describes how commandlet input/output is mapped to schema types
    -->
    <Schema>
    <!--
    Definition of a schema class 'user'
    -->
    <Class Name="User">
    <!--
    Definition of Properties, at least one property needs to be marked as IsUniqueKey.
    -->
    <Properties>

    <!--
    A Property element contains the definition of Schema property.
    Attributes:
    "Name" = The name of the property
    "DataType" = The data type (valid values are String, Int, Bool, DateTime)
    "IsUniqueKey" = indicates, that the property can be used to identify an object instance
    "IsMandatory" = indicates, that the property is mandatory
    "IsAutofill" = indicates, that the value of this property is created by the system
    "IsDisplay" = indicates, that the value of this property is used as a display
    "IsRevision" = indicates, that the value of this property is used as revision
    -->

    <Property Name="Name" DataType="String" IsUniqueKey="true" IsMandatory="true" IsAutoFill="true">
    <ReturnBindings>
    <Bind CommandResultOf="Get-LocalAccounts" Path="Name" />
    </ReturnBindings>
    <CommandMappings>
    <Map ToCommand="Create-LocalAccount"/>
    </CommandMappings>
    </Property>

    <Property Name="Description" DataType="String">
    <ReturnBindings>
    <Bind CommandResultOf="Get-LocalAccounts" Path="Description" />
    </ReturnBindings>
    <CommandMappings>
    <Map ToCommand="Create-LocalAccount"/>
    </CommandMappings>
    </Property>

    </Properties>

    <!--
    The read configuration is mandatory. It defines the ListingCommand which is used to pull
    a list of all objects of this type from the system. Furthermore, the additional commandsequence
    defines the list of commands, that need to be executed to fully load a single object with all
    properties defined in the schema
    -->
    <ReadConfiguration>
    <ListingCommand Command="Get-LocalAccounts">
    <SetParameter Param="Filter" Source="FixedValue" Value="*" />
    <SetParameter Param="Properties" Source="FixedArray" Value="Name" />
    </ListingCommand>
    <CommandSequence>
    <Item Command="Get-LocalAccounts" Order="1" >
    <SetParameter Param="Properties" Source="FixedArray" Value="Name,AccountType,Description,Domain" />
    </Item>
    </CommandSequence>
    </ReadConfiguration>


    <!--
    The MethodConfiguration section describes all methods that are available for this class. In order to stay compatible with
    the D1IM Projector, you schould use the name
    - Insert -> Commands that create a new object
    - Update -> Commands that modify an exisiting object
    - Delete -> Commands that delete an exisiting object
    -->
    <MethodConfiguration>
    <!--Define a method named "Insert"-->
    <Method Name="Insert">
    <!--An "Insert" consists of the following command calls-->
    <CommandSequence>
    <Item Command="Create-LocalAccount" Order="1">
    <SetParameter Param="PassThru" Source="SwitchParameter" Value="" />
    </Item>
    <!--
    The Condition "ModificationExisits" causes, that this command is only executed,
    if one or more propert(ies) were set, that are written by this command.
    -->
    </CommandSequence>
    </Method>
    </MethodConfiguration>
    </Class>
    </Schema>

    </PowershellConnectorDefinition>
Children
No Data