The cmdlets Enable-D365MaintenanceMode and Disable-D365MaintenanceMode currently use Microsoft.Dynamics.AX.Deployment.Setup.exe to manage the maintenance mode of the environment. Microsoft documentation says that it should only be used on VHD based environments, while for cloud hosted environments, a SQL script should be used.
The cmdlets already use the SQL script as fallback in case the command is not executed with admin privileges. The fallback check should also include a check for the environment type.
Discussed in https://github.com/d365collaborative/d365fo.tools/discussions/585
The cmdlets Enable-D365MaintenanceMode and Disable-D365MaintenanceMode currently use Microsoft.Dynamics.AX.Deployment.Setup.exe to manage the maintenance mode of the environment. Microsoft documentation says that it should only be used on VHD based environments, while for cloud hosted environments, a SQL script should be used.
The cmdlets already use the SQL script as fallback in case the command is not executed with admin privileges. The fallback check should also include a check for the environment type.