The Get-MDMDevicecmdlet returns the list of Windows Mobile devices managed by Mobile Device Manager (MDM) 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.
 Note: | 
|---|
| Get-MDMDevicedoes not return newly enrolled devices until after they connect to MDM for the first time. | 
Syntax
Get-MDMDevice [[-DeviceId] <DeviceIdParameter[]>] [-ConnectedBefore <DateTime>] [-ConnectedAfter <DateTime>] [<CommonParameters>] Get-MDMDevice [-Owner <OwnerIdParameter[]>] [-ConnectedBefore <DateTime>] [-ConnectedAfter <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).
 
- 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.
 
- ConnectedBefore <DateTime>
 - 
Returns the list of managed devices that connected to MDM Device Management Server before the specified date and time.
 
- ConnectedAfter <DateTime>
 - 
Returns the list of managed devices that connected to MDM Device Management Server after the specified date and time.
 
- 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.
 Copy Code
 | 
|
|---|---|
C:\PS>Get-MDMDevice  | 
|
This Get-MDMDevicecommand example returns information for the managed device, Device1.
 Copy Code
 | 
|
|---|---|
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.
 Copy Code
 | 
|
|---|---|
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
See Also
Note: