Get-CMCollectionExcludeMembershipRule

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

構文

Get-CMCollectionExcludeMembershipRule
   -CollectionName <String>
   [-ExcludeCollectionName <String>]
   [<CommonParameters>]
Get-CMCollectionExcludeMembershipRule
   -CollectionName <String>
   -ExcludeCollection <IResultObject>
   [<CommonParameters>]
Get-CMCollectionExcludeMembershipRule
   -CollectionName <String>
   -ExcludeCollectionId <String>
   [<CommonParameters>]
Get-CMCollectionExcludeMembershipRule
   -CollectionId <String>
   -ExcludeCollection <IResultObject>
   [<CommonParameters>]
Get-CMCollectionExcludeMembershipRule
   -CollectionId <String>
   -ExcludeCollectionId <String>
   [<CommonParameters>]
Get-CMCollectionExcludeMembershipRule
   -CollectionId <String>
   [-ExcludeCollectionName <String>]
   [<CommonParameters>]
Get-CMCollectionExcludeMembershipRule
   -InputObject <IResultObject>
   -ExcludeCollection <IResultObject>
   [<CommonParameters>]
Get-CMCollectionExcludeMembershipRule
   -InputObject <IResultObject>
   -ExcludeCollectionId <String>
   [<CommonParameters>]
Get-CMCollectionExcludeMembershipRule
   -InputObject <IResultObject>
   [-ExcludeCollectionName <String>]
   [<CommonParameters>]

説明

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

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

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

注意

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

例 1: コレクションの除外メンバーシップ ルールを取得する

このコマンドは、ID XYZ00012を持つコレクションから ID SMSDM0001を持つコレクションのメンバーを除外するルールを取得します。

Get-CMCollectionExcludeMembershipRule -CollectionId "XYZ00012" -ExcludeCollectionId "SMSDM001"

パラメーター

-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

-ExcludeCollection

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

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

-ExcludeCollectionId

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

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

-ExcludeCollectionName

ルールを取得する除外コレクションの名前を指定します。

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-CMDeviceCollectionExcludeMembershipRule および Get-CMUserCollectionExcludeMembershipRuleに似ています。 このコマンドレットは、デバイス またはユーザー コレクションで動作します。