Enable-AzureADDirectoryRole

Aktywuje istniejącą rolę katalogu w usłudze Azure Active Directory.

Składnia

Enable-AzureADDirectoryRole
      [-InformationAction <ActionPreference>]
      [-InformationVariable <String>]
      [-RoleTemplateId <String>]
      [<CommonParameters>]

Opis

Polecenie cmdlet Enable-AzureADDirectoryRole aktywuje istniejącą rolę katalogu w usłudze Azure Active Directory.

Przykłady

Przykład 1. Włączanie roli katalogu

# 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.

Pierwsze polecenie pobiera rolę osoby zapraszającego, która ma nazwę wyświetlaną Osoba zapraszający gościa przy użyciu polecenia cmdlet Get-AzureADDirectoryRoleTemplate (./Get-AzureADDirectoryRoleTemplate.md).. Polecenie przechowuje osobę zapraszaną gościa w zmiennej $InviterRole.

Drugie polecenie wyświetla zawartość $InviterRole.

Ostatnie polecenie włącza rolę katalogu w $InviterRole.

Parametry

-InformationAction

Określa, w jaki sposób to polecenie cmdlet reaguje na zdarzenie informacyjne. Dopuszczalne wartości dla tego parametru to:

  • Kontynuuj
  • Zignoruj
  • Zapytać
  • SilentlyContinue
  • Stop
  • Wstrzymanie
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InformationVariable

Określa zmienną, w której ma być przechowywany komunikat zdarzenia informacyjnego.

Type:String
Aliases:iv
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RoleTemplateId

Identyfikator szablonu roli do włączenia

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Uwagi

Zobacz przewodnik migracji dotyczący polecenia Enable-AzureADDirectoryRole do programu Microsoft Graph PowerShell.