appId = Microsoft.Exchange.Data.Directory.SystemConfiguration.WellknownPartnerApplicationIdentifiers]::Exchange; $partnerApp ...

$appId = [Microsoft.Exchange.Data.Directory.SystemConfiguration.WellknownPartnerApplicationIdentifiers]::Exchange;          $partnerApp = get-PartnerApplication $appId - ErrorAction SilentlyContinue - DomainController $RoleDomainController | Где {$_.IssuerIdentifier - ieq ""};          $roleAssignmentName = "ExchangeCrossServiceIntegration Exchange Online"          $roleAssignment = get-ManagementRoleAssignment - DomainController $RoleDomainController | где {$_.Имя - ieq $roleAssignmentName};          Если ($roleAssignment - eq $null)          {            Новые ManagementRoleAssignment-роли «ExchangeCrossServiceIntegration»-$partnerApp.LinkedAccount пользователя-имя "ExchangeCrossServiceIntegrationScope" $roleAssignmentName - CustomConfigWriteScope - DomainController $RoleDomainController;          }
English
English (United States)
Русский
Russian