Commands / Get-sqmSsasDeploymentMode
Get-sqmSsasDeploymentMode
Configuration sqmSQLTool v1.9.x · Get
Reads the current DeploymentMode (Multidimensional, Tabular, or SharePoint/PowerPivot) of an SSAS instance. Locates msmdsrv.ini via the Windows service command line and reads the <DeploymentMode> element — entirely read-only, nothing is changed. Companion to Set-sqmSsasDeploymentMode, which corrects it.
Why this matters: SSAS fixes its server mode permanently at setup time via SERVERMODE. Microsoft's documented remedy for the wrong choice is uninstall + reinstall — there is no supported "switch mode" command, which is exactly why this pair of functions exists.

Parameters

ParameterTypeRequiredDefaultNotes
-InstanceNamestringOptionalMSSQLSERVERSSAS instance name. A "Server\Instance" prefix (as copied from SSMS) is accepted, the server part is stripped.
-EnableExceptionswitchSwitch$falseThrow immediately instead of logging the error and returning it in the result.

Execution Flow

START "Server\Instance" given? → strip everything before the last "\" Service name: MSSQLServerOLAPService, or MSOLAP$<Instance> for a named one Service found (Get-CimInstance)? NO Status=Error service not found YES Parse the service's command line for the -s "<ConfigDir>" switch Not present? Fallback: ...\OLAP\bin\msmdsrv.exe → ...\OLAP\Config Neither pattern matches → Status=Error, config path not determinable <ConfigDir>\msmdsrv.ini exists? NO Status=Error ini not found YES Load msmdsrv.ini as XML, read /ConfigurationSettings/DeploymentMode Node missing → treat as 0 (Multidimensional is the implicit default) 0=Multidimensional, 1=SharePoint, 2=Tabular Unrecognized numeric value → reported as "Unbekannt(<value>)" Status=OK, DeploymentMode + DeploymentModeValue set Return $result Any error → Status=Error, logged + Write-Error, or throw with -EnableException DONE

Output object

FieldContents
InstanceNameInstance name, with any server prefix stripped.
ServiceNameWindows service name of the SSAS instance.
IniPathPath to msmdsrv.ini.
DeploymentModeMultidimensional, Tabular, SharePoint, or Unbekannt(<value>).
DeploymentModeValueRaw numeric value from msmdsrv.ini (0/1/2).
Status / MessageOK or Error, with detail.

Examples

Check the default instance
Get-sqmSsasDeploymentMode
Check a named instance
Get-sqmSsasDeploymentMode -InstanceName "APSM"

Requirements

Requires local administrator rights on the SSAS server (to read msmdsrv.ini).

See also

Set-sqmSsasDeploymentMode, corrects the mode after installation.