Get-CMDeviceCollectionDirectMembershipRule
デバイス コレクションの直接メンバーシップ ルールを取得します。
構文
Get-CMDeviceCollectionDirectMembershipRule
-CollectionName <String>
[-ResourceName <String>]
[<CommonParameters>]
Get-CMDeviceCollectionDirectMembershipRule
-CollectionName <String>
-Resource <IResultObject>
[<CommonParameters>]
Get-CMDeviceCollectionDirectMembershipRule
-CollectionName <String>
-ResourceId <String>
[<CommonParameters>]
Get-CMDeviceCollectionDirectMembershipRule
-CollectionId <String>
-Resource <IResultObject>
[<CommonParameters>]
Get-CMDeviceCollectionDirectMembershipRule
-CollectionId <String>
-ResourceId <String>
[<CommonParameters>]
Get-CMDeviceCollectionDirectMembershipRule
-CollectionId <String>
[-ResourceName <String>]
[<CommonParameters>]
Get-CMDeviceCollectionDirectMembershipRule
-InputObject <IResultObject>
-Resource <IResultObject>
[<CommonParameters>]
Get-CMDeviceCollectionDirectMembershipRule
-InputObject <IResultObject>
-ResourceId <String>
[<CommonParameters>]
Get-CMDeviceCollectionDirectMembershipRule
-InputObject <IResultObject>
[-ResourceName <String>]
[<CommonParameters>]
説明
このコマンドレットを使用して、デバイス コレクションの 1 つ以上の直接メンバーシップ ルールを取得します。
直接 メンバーシップ ルールを使用すると、デバイス コレクションのメンバーを明示的に選択できます。
既定のコレクションには、直接のメンバーシップ ルールが設定されません。 ターゲットとするコレクションには、サイト コードで始まる ID を持つ必要があります SMS
。
詳細については 、「Configuration Manager でコレクションを作成する方法」を参照してください。
注意
Configuration Manager サイト ドライブから Configuration Manager コマンドレットを実行します PS XYZ:\>
。 詳細については 、「Getting started」を参照してください。
例
例 1: コレクションのすべての直接メンバーシップ ルールを名前で取得する
このコマンドは 、Device01という名前のデバイス コレクションの直接メンバーシップ ルールを取得します。
Get-CMDeviceCollectionDirectMembershipRule -CollectionName "Device01"
例 2: パイプラインを使用してすべての直接メンバーシップ ルールを取得する
このコマンドは 、Get-CMCollection コマンドレットを使用して Device02 という名前のデバイス コレクション オブジェクト を取得します。 次に、パイプライン 演算子を使用してオブジェクトを Get-CMDeviceCollectionDirectMembershipRule コマンドレットに渡 します。
Get-CMCollection -Name "Device02" | Get-CMDeviceCollectionDirectMembershipRule
パラメーター
-CollectionId
ルールを取得するデバイス コレクションの ID を指定します。 この値は 、CollectionID プロパティです。たとえば XYZ00012
、 です。 既定のコレクションには直接メンバーシップ ルールを設定できないので、この ID はサイト コードではなく、サイト コードから始まります SMS
。
Type: | String |
Aliases: | Id |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CollectionName
ルールを取得するデバイス コレクションの名前を指定します。
Type: | String |
Aliases: | Name |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
ルールを取得するデバイス コレクションのオブジェクトを指定します。 このオブジェクトを取得するには 、Get-CMCollection コマンドレット または Get-CMDeviceCollection コマンドレット を使用します。
Type: | IResultObject |
Aliases: | Collection |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Resource
デバイス コレクションから直接メンバーシップ ルールを取得するデバイス オブジェクトを指定します。 このオブジェクトを取得するには 、Get-CMResource コマンドレットまたは Get-CMDevice コマンドレットを使用 します。
Type: | IResultObject |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
デバイス コレクションから直接メンバーシップ ルールを取得するには、デバイスの ID を指定します。 この値は ResourceID プロパティです 16777219
。たとえば、 です。
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceName
デバイス コレクションから直接メンバーシップ ルールを取得するデバイスの名前を指定します。
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | True |
入力
Microsoft.ConfigurationManagement.ManagementProvider.IResultObject
出力
System.Object