Get-​CM​Device

Gets a device.

Syntax

Get-CMDevice
   -Collection <IResultObject>
   [-DisableWildcardHandling]
   [-Fast]
   [-ForceWildcardHandling]
   [-Name <String>]
   [<CommonParameters>]
Get-CMDevice
   -CollectionId <String>
   [-DisableWildcardHandling]
   [-Fast]
   [-ForceWildcardHandling]
   [-Name <String>]
   [<CommonParameters>]
Get-CMDevice
   [-CollectionId <String>]
   [-DisableWildcardHandling]
   [-Fast]
   [-ForceWildcardHandling]
   -ThreatId <String>
   [<CommonParameters>]
Get-CMDevice
   [-CollectionId <String>]
   [-DisableWildcardHandling]
   [-Fast]
   [-ForceWildcardHandling]
   -ThreatName <String>
   [<CommonParameters>]
Get-CMDevice
   [-CollectionId <String>]
   [-DisableWildcardHandling]
   [-Fast]
   [-ForceWildcardHandling]
   -InputObject <IResultObject>
   [<CommonParameters>]
Get-CMDevice
   -CollectionName <String>
   [-DisableWildcardHandling]
   [-Fast]
   [-ForceWildcardHandling]
   [-Name <String>]
   [<CommonParameters>]
Get-CMDevice
   [-DisableWildcardHandling]
   [-Fast]
   [-ForceWildcardHandling]
   [-Name <String>]
   [<CommonParameters>]
Get-CMDevice
   [-DisableWildcardHandling]
   [-Fast]
   [-ForceWildcardHandling]
   -ResourceId <Int32>
   [<CommonParameters>]

Description

The Get-CMDevice cmdlet gets a Microsoft System Center Configuration Manager device.

Examples

Example 1: Get a device by collection ID

PS C:\> Get-CMDevice -CollectionID "SMSDM003"

This command gets all the device objects in the device collection with the ID of SMSDM003.

Example 2: Get a device by name

PS C:\> Get-CMDevice -CollectionName "All systems" -Name "Win10-86-33"

This command gets the device named Win10-86-33 in the device collection named All systems.

Required Parameters

-Collection

Specifies a device collection object. To obtain a device collection object, use the Get-CMDeviceCollection cmdlet.

Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CollectionId

Specifies an ID for a device collection.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CollectionName

Specifies the name of a device collection.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies an object that represents a threat.

Type:IResultObject
Aliases:Threat
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ResourceId

Specifies the resource ID of a device.

Type:Int32
Aliases:Id, DeviceId
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ThreatId

Specifies an ID of a threat.

Type:String
Aliases:ThreatNameId
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ThreatName

Specifies a name of a threat.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Fast

Indicates that the cmdlet does not automatically refresh lazy properties.Lazy properties contain values that are relatively inefficient to retrieve which can cause additional network traffic and decrease cmdlet performance. If lazy properties are not used, this parameter should be specified.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a device.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False