Enable-AzureADDirectoryRole
Azure Active Directory の既存のディレクトリ ロールをアクティブ化します。
構文
Default (既定)
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)コマンドレットを使用して、表示名 Guest Inviter を持つ招待者ロールを取得します。 このコマンドは、ゲスト招待者を$InviterRole変数に格納します。
2 番目のコマンドは、$InviterRoleの内容を表示します。
最後のコマンドは、$InviterRoleでディレクトリー・ロールを有効にします。
パラメーター
-InformationAction
このコマンドレットが情報イベントに応答する方法を指定します。 このパラメーターに使用できる値は次のとおりです。
- 続ける
- 不問に付す
- 問い合わせる
- 静かに続行
- 止まれ
- [中断]
パラメーターのプロパティ
型: | ActionPreference |
規定値: | None |
ワイルドカードのサポート: | False |
DontShow: | False |
Aliases: | infa |
パラメーター セット
(All)
配置: | Named |
必須: | False |
パイプラインからの値: | False |
プロパティ名別のパイプラインからの値: | False |
残りの引数からの値: | False |
-InformationVariable
情報イベント・メッセージを格納する変数を指定します。
パラメーターのプロパティ
型: | String |
規定値: | None |
ワイルドカードのサポート: | False |
DontShow: | False |
Aliases: | iv |
パラメーター セット
(All)
配置: | Named |
必須: | False |
パイプラインからの値: | False |
プロパティ名別のパイプラインからの値: | False |
残りの引数からの値: | False |
-RoleTemplateId
有効にするロールテンプレートの ID
パラメーターのプロパティ
型: | String |
規定値: | None |
ワイルドカードのサポート: | False |
DontShow: | False |
パラメーター セット
(All)
配置: | Named |
必須: | False |
パイプラインからの値: | False |
プロパティ名別のパイプラインからの値: | False |
残りの引数からの値: | False |
CommonParameters
このコマンドレットでは、一般的なパラメーター -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction、-WarningVariable の各パラメーターがサポートされています。 詳細については、about_CommonParametersを参照してください。
メモ
Microsoft Graph PowerShell への Enable-AzureADDirectoryRole の移行ガイド を参照してください。