How do I run powershell script in Workflow which will fetch users considered in the stage step and update certain attribute after migration

Hi,

How do I run powershell script in Workflow which will fetch users considered in the stage step and update certain attribute after migration. As of now I am not getting sufficient material to comprehend if it is possible via workflow.It just says normal powershell step but not sure how it will act only on those users which were considered in the workflow and wont execute on all users in general.

  • Hi rubarman, the PowerShell workflow step does not have awareness of what users were processed by other steps of the workflow.  You need to add scoping criteria within the script itself to identify which users to update. 

    For example, in the Stage Step in ODM, you could configure the Template to populate a target attribute with "migrated".  If ODM is creating the users, you can set a condition to only populate this value during creation [action = "create"].  If you are matching to existing objects, you can set a condition to only populate this value if the target attribute is currently empty [empty(T.attribute)]. Then you can configure your script to only update target users where that attribute = "migrated", and have the script also update that attribute to "complete" so that the objects are not re-processed every time.