How to Bulk Unlock and Reset the Email Stats against Survey

Modified on Fri, 20 Feb at 10:42 AM

TABLE OF CONTENTS

How to Bulk Unlock and Reset Email Stats for Surveys

This article outlines the process to bulk unlock user surveys in ManagementStudio using a custom PowerShell script. This may be required if a survey was inadvertently locked after user submission.

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 → PS Scripts, Emails, Buttons (1).

  • Under PowerShell Scripts, select the top item named after your current project.

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



  • Enter a name for the script.

  • Click the Edit icon (3) and enter the following script, replacing 73 with the Survey ID noted in Step 1:

    Update-MSLockSurveyForModuleItems -InstanceIds $ScriptArgs.Items -Module UserMigrations -SurveyId 73 -UnLock
    
    Reset-MSSurveyEmailStatsForModuleItems -InstanceIds $ScriptArgs.Items -Module UserMigrations -SurveyId 73
    
  • Click OK(4).

  • Click the Column Picker button and tick Grant Access 2.

  • Enter details for the script configuration as follows:

    ColumnDetails
    Script NameSurvey unlock – Use any descriptive name
    EnabledTicked
    CategoryInternal - Unlock survey
    DescriptionScript to unlock a specified survey
    Edit ScriptPaste the script from above; ensure correct Survey ID is set
    ModuleManagementStudio
    Run AsApi Account
    Grant Access 2Enter the required role group(s), e.g., Power User, with access to run this script


  • Click Save Changes (5).

Step 3 – Configure a UI Button to Run the Unlock Script

  • Navigate to Administration → PS Scripts, Emails, Buttons (1).

  • Under the UI Buttons node, select User Migrations.

  • Click the Plus (+) icon next to the target survey.

  • Enter the desired Button label. Select the appropriate value for Grant access 1 from the drop-down menu.

  • In the Run Script column, select the script configured in Step 2.

  • Click Save Changes.

  • Click Restart.

  • Go to the User Migrations module.

  • In the grid, select the users whose surveys you wish to unlock.

  • Right-click, choose Surveys → [Target Survey] → [Survey Button Name].

  • Click Continue to confirm.

  • Within a few minutes, a notification will appear indicating 'Survey Lock Complete'.




Further Support

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