Setting a Dynamic 365 for Operations cloud hosted environment in Maintenance mode

Some configurations in Dynamics requires you to be in Maintenance Mode. Some of these are:

  • Activating dimensions
  • Changing license keys

The limitations of maintenance mode is that you will need to be Admin or maintenance mode user to log in.

  1. Log into the VM using RDP
  2. Start an elevated command prompt
  3. Go to K:\AosService\PackagesLocalDirectory\Bin\ (in this case K is the service volume)
  4. För följande:
    Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir K:\AosService\PackagesLocalDirectory --bindir K:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser  --sqlpwd [sqlpassword] --setupmode maintenancemode --isinmaintenancemode true
  5. Run IISRESET

To set it back run this

Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir K:\AosService\PackagesLocalDirectory --bindir K:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser  --sqlpwd [sqlpassword] --setupmode maintenancemode --isinmaintenancemode false

and then IISRESET

NOTE: Maintenance mode of a Production environment is set by a service request to DSE.

NOTE: On Sandbox Environments, do the above procedure on one of the AOSes. You might need to run IISreset on all AOSes.

Links:
https://community.dynamics.com/365/financeandoperations/b/ax2012codingaxclated/archive/2018/06/22/d365fo-maintenance-mode-importing-license-file-isv-var-add-on-license-import
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/sysadmin/maintenance-mode

Leave a Reply