TABLE OF CONTENTS
Changing Survey Status via the User Migrations Context Menu
This article describes how to change the survey status (Pass, Fail, Incomplete) for one or more users in the User Migrations module using a custom PowerShell script and UI button from the context menu.
Step 1 – Identify the Survey ID
- Navigate to
Administration → User Migrations → Surveys (Moved) (1). - Expand the Portal Forms tree (2).
- Expand the User Migrations tree (3).
- Select the relevant survey (4).
- Note the
Survey Iddisplayed (e.g.,73).

Step 2 – Create the PowerShell Script
Go to
Administration → User Migrations → PowerShell Scripts (1).Click
User Migrations (2).Select
Click here to add new item (3).

Enter a
Script Name (1).Open the PowerShell Editor (2).

Paste the following script:
$surveys = Get-MSSurveysForModuleItems -Module UserMigrations -SurveyId $ScriptArgs.EventArg2 -InstanceIds $ScriptArgs.Items
foreach($survey in $surveys) {
If($ScriptArgs.EventArg1 -eq 'Pass') { $survey.CompleteResult = $True; $survey.CompletedBy = $ScriptArgs.RanByUser }
If($ScriptArgs.EventArg1 -eq 'Fail') { $survey.CompleteResult = $fail; $survey.CompletedBy = $ScriptArgs.RanByUser }
If($ScriptArgs.EventArg1 -eq 'Incomplete') { $survey.CompleteResult = $null; $survey.CompletedBy = $ScriptArgs.RanByUser }
}
Update-MSSurveysForModuleItems -Module UserMigrations -SurveyReults $surveysClick
OK (3).Complete the script configuration fields as follows:
Column Details Script NameOverride Survey Status (any name can be used) EnabledTicked CategorySurvey (any category can be used) DescriptionScript to change the status of a specified survey ModuleUser Migrations Run AsApi Account Grant AccessPower User role group or other appropriate role group Click Edit to edit the PowerShell scriptPaste the above script Click
Save Changes (4).
Step 3 – Configure the UI Button
- Navigate to
Administration → User Migrations → UI Buttons (1). - Identify the survey you wish to target (2).
- Click the
Plusicon next to the target survey (3). - Enter the button label, e.g.,
Override Survey Status (4). - Within this button, add three sub-buttons by clicking the
Plusicon (5):Pass,Fail, andIncomplete (6). - Set
Grant Access 1as appropriate. - Under
Run Script, select the script name created in Step 2 (7). - Use the grid chooser (top right) to enable columns
Arg1andArg2 (8). - In the
Arg1column, enterPass,Fail, orIncompletefor each sub-button (9). - In the
Arg2column, enter theSurvey Ididentified in Step 1 for each sub-button (10). - Click
Save Changes (11).

Step 4 – Run the Script from the Context Menu
- Restart the client application.
- Navigate to the
User Migrationsmodule. - Select the users whose survey status you wish to change from the grid.
- Right-click, then select:
Surveys (1)→ target survey (2)→ override survey status button (3) → relevant sub-button (Pass,Fail, orIncomplete) (4).

- Click
Continueto confirm the action.

- A message stating
Survey Change Status Completewill appear once the process finishes.

Further Support
For additional assistance, visit the ManagementStudio Service Desk to search the knowledge base or submit a support ticket.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article