Select-EntraGroupIdsUserIsMemberOf
ユーザーがメンバーになっているグループを選択します。
構文
Default (既定)
Select-EntraGroupIdsUserIsMemberOf
-UserId <String>
-GroupIdsForMembershipCheck <GroupIdsForMembershipCheck>
[<CommonParameters>]
説明
Select-EntraGroupIdsUserIsMemberOf コマンドレットは、ユーザーがMicrosoft Entra IDのメンバーであるグループを選択します。
例
例 1: ユーザーのグループのグループ メンバーシップを取得する
Connect-Entra -Scopes 'Application.Read.All'
$myGroup = Get-EntraGroup -Filter "DisplayName eq '<Group-DisplayName>'"
$UserId = 'SawyerM@contoso.com'
$groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck
$groups.GroupIds = $myGroup.Id
Select-EntraGroupIdsUserIsMemberOf -UserId 'SawyerM@contoso.com' -GroupIdsForMembershipCheck $groups
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb
次の使用例は、ユーザーのグループのグループ メンバーシップを取得します。
-
-UserIdパラメーターは、ユーザーのオブジェクト ID を指定します (UserPrincipalName または ObjectId として)。 -
-GroupIdsForMembershipCheckパラメーターは、グループ オブジェクト ID を指定します。
パラメーター
-GroupIdsForMembershipCheck
グループ オブジェクト ID の配列を指定します。
パラメーターのプロパティ
| 型: | GroupIdsForMembershipCheck |
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
パラメーター セット
(All)
| 配置: | Named |
| 必須: | True |
| パイプラインからの値: | True |
| プロパティ名別のパイプラインからの値: | True |
| 残りの引数からの値: | False |
-UserId
Microsoft Entra ID内のユーザーの ID (UserPrincipalName または ObjectId として) を指定します。
パラメーターのプロパティ
| 型: | System.String |
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
| Aliases: | オブジェクト識別子 |
パラメーター セット
(All)
| 配置: | Named |
| 必須: | True |
| パイプラインからの値: | True |
| プロパティ名別のパイプラインからの値: | True |
| 残りの引数からの値: | False |
CommonParameters
このコマンドレットでは、一般的なパラメーター -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction、-WarningVariable の各パラメーターがサポートされています。 詳細については、about_CommonParametersを参照してください。