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 | Where { $_.IssuerIdentifier -ieq ""};          $roleAssignmentName = "ExchangeCrossServiceIntegration-Exchange Online"          $roleAssignment = Get-ManagementRoleAssignment -DomainController $RoleDomainController | where {$_.Name -ieq $roleAssignmentName };          if($roleAssignment -eq $null)          {            New-ManagementRoleAssignment -Role "ExchangeCrossServiceIntegration" -User $partnerApp.LinkedAccount -Name $roleAssignmentName -CustomConfigWriteScope "ExchangeCrossServiceIntegrationScope" -DomainController $RoleDomainController;          }
English
English (United States)
Русский
Russian