Get-CMCollectionIncludeMembershipRule

デバイスまたはユーザー コレクションの include メンバーシップ ルールを取得します。

構文

Get-CMCollectionIncludeMembershipRule
   -CollectionName <String>
   [-IncludeCollectionName <String>]
   [<CommonParameters>]
Get-CMCollectionIncludeMembershipRule
   -CollectionName <String>
   -IncludeCollection <IResultObject>
   [<CommonParameters>]
Get-CMCollectionIncludeMembershipRule
   -CollectionName <String>
   -IncludeCollectionId <String>
   [<CommonParameters>]
Get-CMCollectionIncludeMembershipRule
   -CollectionId <String>
   -IncludeCollection <IResultObject>
   [<CommonParameters>]
Get-CMCollectionIncludeMembershipRule
   -CollectionId <String>
   -IncludeCollectionId <String>
   [<CommonParameters>]
Get-CMCollectionIncludeMembershipRule
   -CollectionId <String>
   [-IncludeCollectionName <String>]
   [<CommonParameters>]
Get-CMCollectionIncludeMembershipRule
   -InputObject <IResultObject>
   -IncludeCollection <IResultObject>
   [<CommonParameters>]
Get-CMCollectionIncludeMembershipRule
   -InputObject <IResultObject>
   -IncludeCollectionId <String>
   [<CommonParameters>]
Get-CMCollectionIncludeMembershipRule
   -InputObject <IResultObject>
   [-IncludeCollectionName <String>]
   [<CommonParameters>]

説明

デバイスまたはユーザー コレクションの 1 つ以上の include メンバーシップ ルールを取得するには、このコマンドレットを使用します。 include メンバーシップ ルール には、ルールが適用されるコレクションに対する別のコレクションのメンバーが含まれます。

Configuration Manager は、含まれるコレクションのメンバーシップが変更された場合、スケジュールに基じてコレクションのメンバーシップを動的に更新します。

詳細については 、「Configuration Manager でコレクションを作成する方法」を参照してください

注意

Configuration Manager サイト ドライブから Configuration Manager コマンドレットを実行します PS XYZ:\> 。 詳細については 、「Getting started」を参照してください

例 1: すべての include メンバーシップ ルールを取得する

このコマンドは、Device という名前のコレクションのすべての include メンバーシップ ルールを 取得します

Get-CMCollectionIncludeMembershipRule -CollectionName "Device"

例 2: パイプラインを使用してメンバーシップ ルールを含める

このコマンドは、 まず Get-CMCollection を使用して Users という名前のコレクション オブジェクトを 取得します。 次に、パイプライン 演算子を使用してオブジェクトを Get-CMCollectionIncludeMembershipRule コマンドレットに渡します。コレクション オブジェクトのメンバーシップ ルールが含まれます。

Get-CMCollection -Name "Users" | Get-CMCollectionIncludeMembershipRule

パラメーター

-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

-IncludeCollection

含まれているコレクションのオブジェクトを指定して、ルールを取得します。 このオブジェクトを取得するには 、Get-CMCollectionコマンドレット 、Get-CMDeviceCollectionコマンドレット、 または Get-CMUserCollection コマンドレットを使用します。

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

-IncludeCollectionId

ルールを取得するには、含まれるコレクションの ID を指定します。 この値は 、CollectionID プロパティです。たとえば XYZ00012 、 です。 既定のコレクションを含め、この値はサイト コードまたは SMS .

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

-IncludeCollectionName

ルールを取得するには、含まれるコレクションの名前を指定します。

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

-InputObject

ルールを取得するコレクションのオブジェクトを指定します。 このオブジェクトを取得するには 、Get-CMCollectionコマンドレット 、Get-CMDeviceCollectionコマンドレット、 または Get-CMUserCollection コマンドレットを使用します。

Type:IResultObject
Aliases:Collection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

入力

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

出力

System.Object

メモ

このコマンドレットは、コレクションの種類に固有の Get-CMDeviceCollectionIncludeMembershipRule および Get-CMUserCollectionIncludeMembershipRuleに似ています。 このコマンドレットは、デバイス またはユーザー コレクションで動作します。