Move a User Migration to a Process when the Survey is Passed/Failed

Modified on Tue, 01 Mar 2022 at 03:12 PM

It's often useful to be able to automatically move a User Migration to a different workflow process when a User Survey is passed by that User. Use the steps below to implement this.

Be aware that User Migrations will be moved into the specified process regardless of the process they are currently in when using this approach.

  • Administration -> User Migrations -> Surveys (1) -> Choose Survey from dropdown (2).
  • Change to the PS / CSS / JS tab (3).
  • Add in the code below to the On Submit Powershell (4) section.
  • Change the ProcessName and SubProcessName as required (the SubProcessName part can be deleted if there is no sub-process)
  • Save Changes (5).
  • Test by passing/Failing a user survey, the User Migration record should be moved into the specified process workflow.

    If the user Passes the Survey then move to a new Process
    Items: The ID that did the sign off
    EventArg1: Sign-Off Result e.g Passed / Failed

if($ScriptArgs.EventArg1 -eq "Passed") {
Move-MSModuleItemProcesses -Module UserMigrations -Ids $ScriptArgs.Items -ProcessName "2. Validating" -SubProcessName "Survey Pass"
else {

Move-MSModuleItemProcesses -Module UserMigrations -Ids $ScriptArgs.Items -ProcessName "2. Validating" -SubProcessName "Survey Fail"

Further Support

If you require further support, please visit ManagementStudio's Service Desk to search the knowledge base or create a new support ticket.