Thursday, April 6, 2017

Editing license configuration requires *Maintenance Mode* - use Deployment.Setup tool

Today I tried to change license keys in Dynamics 365 for Operations to enable Commerce essentials license key. What was unexpected comparing to previous AX versions is that i could not do it.

The warning says:
This form is read-only unless the system is in the maintenance mode. Maintenance mode can be enabled in this environment by running maintenance job from LCS, or using Deployment.Setup tool locally

Luckily there is a long guide on AX wiki. To spare you some time here is all you need to know:

1. Navigate to your AOS folder (e.g. C:\AOSService\PackagesLocalDirectory\Bin
2. Press Shift on keyboard, hold it, right-click in Explorer

3. Paste this and change parameters with your variables:

Microsoft.Dynamics.AX.Deployment.Setup.exe -setupmode maintenancemode --metadatadir C:\AOSService\PackagesLocalDirectory --bindir C:\AOSService\PackagesLocalDirectory --sqlserver "." --sqldatabase "AxDB" --isinmaintenancemode true --sqluser Godzilla --sqlpwd 1

pay particular attention to Metadatadir, bindir, sqluser, sqlpwd parameters

4. Paste into the command line window
5. This is what you should get:

6. Type iisreset -noforce and press enter
7. Log back into Dynamics 365 for Operations

Now you'll be able to edit the license keys.


Once you do,
Remember to turn off the maintenance mode:

Microsoft.Dynamics.AX.Deployment.Setup.exe -setupmode maintenancemode --metadatadir C:\AOSService\PackagesLocalDirectory --bindir C:\AOSService\PackagesLocalDirectory --sqlserver "." --sqldatabase "AxDB" --sqluser Godzilla --sqlpwd 1 --isinmaintenancemode false