Get-CMCollectionMember

Gets a member of a collection.

Syntax

Get-CMCollectionMember
   -CollectionId <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-Name <String>]
   [-ResourceId <Int32>]
   [-SmsId <String>]
   [<CommonParameters>]
Get-CMCollectionMember -CollectionName  [-DisableWildcardHandling] [-ForceWildcardHandling]
 [-Name ] [-ResourceId ] [-SmsId ] []
Get-CMCollectionMember [-DisableWildcardHandling] [-ForceWildcardHandling] -InputObject 
 [-Name ] [-ResourceId ] [-SmsId ] []

Description

The Get-CMCollectionMember cmdlet gets a member of a collection.

Examples

Example 1: Get a member of a collection by using the pipeline operator

PS C:\> Get-CMCollection -Name "UserCol1" | Get-CMCollectionMember

This command gets the collection object named UserCol1 and uses the pipeline operator to pass the object to Get-CMCollectionMember, which gets all members in UserCol1.

Example 2: Get a member of a collection by name

PS C:\> Get-CMCollectionMember -CollectionName "DeviceCol1" -Name "domain*"

This command gets the all members of the device collection named DeviceCol1 that have a name beginning with domain.

Required Parameters

-CollectionId

Specifies the ID of a collection.

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

Specifies the name of a collection.

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

Specifies a collection object. To obtain a collection object, use the Get-CMCollection, Get-CMDeviceCollection or Get-CMUserCollection cmdlets.

Type:IResultObject
Aliases:Collection
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
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
-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 resource.

Type:String
Aliases:ResourceName
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceId

Specifies the ID of a resource.

Type:Int32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SmsId

Specifies the SMSID of a resource.

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