Shut down MongoDB cleanly on Windows Server 2016

When you shut down Planning Analytics Workspace on a Windows 2016, you must make sure that you shut down the MongoDB container cleanly. To perform this shutdown safely, use the Local Group Policy Editor to add the Planning Analytics Workspace shutdown.ps1 script to the scripts that are launched at shutdown.

About this task

Important: You must not stop the MongoDB container by using docker commands such as docker stop. Always use the Planning Analytics Workspace administration tool or the <paw_install>/scripts/paw.ps1 script.

The <paw_install>/scripts/paw.ps1 script calls the <paw_install>/scripts/shutdown.ps1 script whenever an operation that might shut down MongoDB is invoked. Use the Local Group Policy Editor to add shutdown.ps1 to the scripts that are launched at shutdown.

Procedure

  1. In a command window, open the Group Policy Editor (GPE) by running gpedit.msc.
  2. Expand Computer Configuration and select Windows Settings.
  3. Double-click Scripts (Startup/Shutdown).
  4. Switch to the PowerShell Scripts tab.
  5. Click Add and add <paw_install>/scripts/shutdown.ps1.