Set-sqmSsasDeploymentMode
Configuration
sqmSQLTool v1.9.x · Set
✓ -WhatIf supported · High Impact
SERVERMODE. Microsoft does not officially support changing it afterwards, the documented remedy is uninstall + reinstall with the correct SERVERMODE.
The unsupported-but-practical workaround: on an instance where
SERVERMODE was chosen wrong and no databases have been deployed yet, the mode can be corrected by editing the <DeploymentMode> element in msmdsrv.ini (0=Multidimensional, 1=SharePoint, 2=Tabular) and restarting the service. This function does exactly that: locates msmdsrv.ini, backs it up, updates the element, and optionally restarts the service.Multidimensional and Tabular are storage-incompatible. If databases already exist under the instance's Data directory, switching mode orphans them, they will not open in the new mode. By default the function refuses to proceed when existing databases are detected.
-Force overrides this, only after you have verified there is nothing worth keeping or made your own backup.Parameters
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| -InstanceName | string | Optional | MSSQLSERVER | SSAS instance name. |
| -Mode | string | Required | , | Target mode: Multidimensional or Tabular. (SharePoint/PowerPivot is legacy and not offered as a target.) |
| -RestartService | switch | Switch | $false | Restart the SSAS service so the change takes effect immediately. Without it, the change is written but needs a manual restart. |
| -Force | switch | Switch | $false | Proceed even when existing databases are found under the Data directory. Only when you're certain they can be discarded. |
| -EnableException | switch | Switch | $false | Throw immediately instead of logging the error and returning it in the result. |
Execution Flow
Output object
| Field | Contents |
|---|---|
InstanceName / IniPath | Which instance, and the config file that was read/changed. |
PreviousMode / NewMode | Mode before the change, and the requested target. |
DatabasesFound | Number of existing database folders detected under the Data directory. |
BackupPath | Path of the msmdsrv.ini backup — only set when a change was actually written. |
ServiceRestarted | Whether the SSAS service was restarted. |
Status | AlreadySet, Changed, Blocked, WhatIf, or Error. |
Message | Detail message. |
Examples
Correct a default instance to Tabular, restart immediately
Set-sqmSsasDeploymentMode -InstanceName "MSSQLSERVER" -Mode Tabular -RestartService
Preview the change for a named instance, nothing written
Set-sqmSsasDeploymentMode -InstanceName "SSAS2019" -Mode Multidimensional -WhatIf
Force the switch despite existing databases (only after your own backup/check)
Set-sqmSsasDeploymentMode -InstanceName "SSAS2019" -Mode Tabular -Force -RestartService
Requirements
Requires local administrator rights on the SSAS server. This is not an officially supported operation, only safe on an instance without deployed databases. See Microsoft's documentation on SERVERMODE / DeploymentMode for the background.
See also
Get-sqmSsasDeploymentMode, the read-only companion — check before you change.