How to Bulk Lock a Survey (or Unlock)

Modified on Fri, 23 Jan at 4:35 PM

TABLE OF CONTENTS



How to Bulk Lock a Survey (or Unlock)

Administrators can lock surveys to prevent end-users from starting or submitting responses. Survey locks can be applied individually, in bulk, or through automation. This article describes how to bulk lock a survey within the User Migrations module. The process also applies to other modules within ManagementStudio.

Refer to this article for unlocking a survey.


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 ID displayed.






Step 2 – Create and Configure the PowerShell Script

  • Navigate to Administration → User Migrations PowerShell Scripts (1).

  • Click Click here to add new item (2).


  • Enter a script name (3).

  • Click the Edit icon and enter the following script, updating XX to the Survey ID noted in Step 1:

    Update-MSLockSurveyForModuleItems -InstanceIds $ScriptArgs.Items -Module UserMigrations -SurveyId XX
    

    To unlock a survey, add the -UnLock switch to the script.

  • Complete the relevant script configuration columns:

    ColumnDetails
    Script NameAny descriptive name (e.g., Lock Validation Survey)
    EnabledTicked
    CategoryInternal - Lock survey
    DescriptionScript to lock a specified survey
    PowerShell ScriptPaste the updated script
    ModuleUser Migrations
    Run AsApi Account
    Grant AccessSelect the Power User role group or another appropriate role group


  • Click Ok (4).
  • Click Save Changes (5) to store the script.




Step 3 – Add a UI Button to Run the Lock Script

  • Navigate to Administration → User Migrations → UI Buttons (1).
  • Identify the target survey and click the Plus (+) icon (2).
  • Enter a button label and select the required Grant access level (3).
  • Select the script created in Step 2 from the Run Script dropdown.
  • Click Save Changes (4).


  • Click Restart to apply changes.

Using the Button to Lock Surveys

  • Switch to the User Migrations module.
  • Select the relevant users from the grid whose surveys you want to lock (1).
  • Right-click and select Surveys (2) → [Target Survey] (3) → [Survey Button] (4) (as configured in Step 3).




  • Click Continue to confirm the action.


  • A 'Survey Lock Complete' message will be displayed within a few minutes.




Further Support

For additional assistance, visit the ManagementStudio Service Desk to search the knowledge base or to create 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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article