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