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 でコレクションを作成する方法」を参照してください。

注:

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

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

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

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

パラメーター

-CollectionId

規則を取得するコレクションの ID を指定します。 この値は CollectionID プロパティです (たとえば、 XYZ00012)。 既定のコレクションにはメンバーシップの除外規則がないため、この ID は SMSではなくサイト コードで始まります。

型:String
Aliases:Id
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-CollectionName

規則を取得するコレクションの名前を指定します。

型:String
Aliases:Name
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-ExcludeCollection

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

型:IResultObject
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-ExcludeCollectionId

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

型:String
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-ExcludeCollectionName

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

型:String
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-InputObject

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

型:IResultObject
Aliases:Collection
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:True
ワイルドカード文字を受け取る:False

入力

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

出力

System.Object

メモ

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