Get-CMDevice

Gets a device.

Syntax

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

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
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CollectionId

Specifies an ID for a device collection.

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

Specifies the name of a device collection.

Type:String
Required:True
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
Required:True
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
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ThreatId

Specifies an ID of a threat.

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

Specifies a name of a threat.

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

Optional Parameters

-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

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

Specifies the name of a device.

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