The Get-MDMServercmdlet returns a collection of MDMServerobjects that represent existing servers in the MDM system.

You can specify an individual server or all servers of a specified type. If no parameters are specified, then all MDM servers are returned.


Get-MDMServer [[-Identity] <string[]>]

Get-MDMServer [-ServerRole <MDMServerRole[]>]


The following describes the Get-MDMServercmdlet parameters.

Identity <String[]>

Specifies the name of an MDM server. This parameter can be the logical name or the fully qualified domain name (FQDN) of the server. If the value contains a space or other special characters, enclose the string in quotation marks.

ServerRole <MDMServerRole[]>

Specifies the type of server to return. Possible values are DeviceManagement, Enrollment, Gateway, SelfService, and All.


This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, at the MDM Shell prompt, type get-help about_commonparameters.

Input Type

The Get-MDMServercmdlet accepts a string through the pipeline that identifies a server or an object that has the property, identity.

Output Type

The Get-MDMServercmdlet returns a collection of MDMServerobjects. To see all the properties for this object, at the MDM Shell prompt, type Get-MDMServer | Get-Member.


This Get-MDMServercommand example returns information about the server, Gateway1.

Copy Code
C:\PS>Get-MDMServer -Identity Gateway1

Cmdlet Help

To view this information online, at the MDM Shell prompt, type:

get-help Get-MDMServer -detailed, or get-help Get-MDMServer -full

See Also