The Get-MDMDevicecmdlet returns the list of Windows Mobile devices managed by Mobile Device Manager Device Management Server.
If you do not specify parameters, Get-MDMDeviceenumerates all enrolled managed devices and displays the device properties as if you typed Get-MDMDevice *. You can find specific managed devices by deviceIdor owner. Alternatively, you can find managed devices that connect to MDM Device Management Server before or after a specific time.
![]() |
---|
Get-MDMDevicedoes not return newly enrolled devices until after they connect to MDM Device Management Server for the first time. |
Syntax
Get-MDMDevice [[-DeviceId] <DeviceIdParameter[]>] [-ConnectedAfter <DateTime>] [-ConnectedBefore <DateTime>] [<CommonParameters>] Get-MDMDevice [-Owner <OwnerIdParameter[]>] [-ConnectedAfter <DateTime>] [-ConnectedBefore <DateTime>] [<CommonParameters>] |
Parameters
The following describes the Get-MDMDevicecmdlet parameters.
- DeviceId <DeviceIdParameter[]>
-
Specifies the identity of the managed device. This parameter can be a device common name, the distinguished name, the fully qualified domain name (FQDN), or the security ID (SID). If the value contains a space or other special characters, enclose the string in quotation marks.
- Owner <OwnerIdParameter[]>
-
Returns the list of managed devices that belong to the specified owner. This parameter can be a common name, e-mail address, distinguished name, SID, or Logon ID. If the value contains a space or other special characters, enclose the string in quotation marks.
- ConnectedBefore <DateTime>
-
Returns the list of managed devices that connected to MDM Device Management Server before the specified date and time. If the value contains a space or other special characters, enclose the string in quotation marks.
- ConnectedAfter <DateTime>
-
Returns the list of managed devices that connected to MDM Device Management Server after the specified date and time. If the value contains a space or other special characters, enclose the string in quotation marks.
- CommonParameters
-
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-MDMDevicecmdlet accepts a string through the pipeline that identifies a managed device, or an object that has the deviceIdproperty.
Output Type
The Get-MDMDevicecmdlet returns an MDMDeviceobject. To see all the properties for this object, at the MDM Shell prompt, type Get-MDMDevice | Get-Member.
Examples
This Get-MDMDevicecommand example returns all devices currently managed by MDM Device Management Server.
![]() |
|
---|---|
C:\PS>Get-MDMDevice |
This Get-MDMDevicecommand example returns information for the managed device, Device1.
![]() |
|
---|---|
C:\PS>Get-MDMDevice -DeviceId Device1 |
This Get-MDMDevicecommand example returns all the managed devices that connected to MDM Device Management Server between January 16, 2006 at 8:00 am, and January 20, 2006 at 5:00 pm.
![]() |
|
---|---|
C:\PS>Get-MDMDevice -ConnectedAfter "1/16/06 8:00 am" -ConnectedBefore "1/20/06 5:00 pm" |
Cmdlet Help
To view this information online, at the MDM Shell prompt, type:
get-help Get-MDMDevice -detailed, or get-help Get-MDMDevice -full