Enable-AzureADDirectoryRole
Azure Active Directory で既存のディレクトリ ロールをアクティブ化します。
構文
Enable-AzureADDirectoryRole
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[-RoleTemplateId <String>]
[<CommonParameters>]
説明
Enable-AzureADDirectoryRole コマンドレットは、Azure Active Directory の既存のディレクトリ ロールをアクティブ化します。
例
例 1: ディレクトリ ロールを有効にする
# Retrieve the Template Role object for the Guest Inviter role
$InviterRole = Get-AzureADDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq "Guest Inviter"}
# Inspect the $Inviter variable to make sure we found the correct template role
$InviterRole
ObjectId DisplayName Description
-------- ----------- -----------
95e79109-95c0-4d8e-aee3-d01accf2d47b Guest Inviter Guest Inviter has access to invite guest users.
# Enable the Inviter Role
Enable-AzureADDirectoryRole -RoleTemplateId $InviterRole.ObjectId
ObjectId DisplayName Description
-------- ----------- -----------
03618579-3c16-4765-9539-86d9163ee3d9 Guest Inviter Guest Inviter has access to invite guest users.
最初のコマンドは、Get-AzureADDirectoryRoleTemplate (./Get-AzureADDirectoryRoleTemplate.md) コマンドレットを使用して、ゲスト招待者という表示名を持つ招待者ロールを取得します。 コマンドは、ゲスト招待元を $InviterRole 変数に格納します。
2 番目のコマンドは、$InviterRoleの内容を表示します。
最後のコマンドは、$InviterRoleのディレクトリ ロールを有効にします。
パラメーター
-InformationAction
このコマンドレットが情報イベントに応答する方法を指定します。 このパラメーターの有効値は、次のとおりです。
- 続行
- Ignore
- 照会
- SilentlyContinue
- Stop
- [中断]
Type: | ActionPreference |
Aliases: | infa |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InformationVariable
情報イベント メッセージを格納する変数を指定します。
Type: | String |
Aliases: | iv |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RoleTemplateId
有効にするロール テンプレートの ID
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
メモ
Microsoft Graph PowerShell への Enable-AzureADDirectoryRole の移行ガイド を参照してください。
関連リンク
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示