Applications Systems
Appinsight for Exchange fails with PowerShell FullLanguageMode is not configured on Remote Host
This article describes an issue where you are trying to set up Appinsight for Exchange however it fails with PowerShell FullLanguageMode is not configured on Remote Host.
First published date
Last published date
Overview
Appinsight for Exchange fails with the following error:
PowerShell FullLanguageMode is not configured on Remote Host At line: 1 char: 30 + Select-Object @(n="test"; e={}} + ~~ Script block literals are not allowed in restricted language mode or a Data section.
The configure server is performing the below:
Invoke-Command -Session $sess -ScriptBlock { Select-Object @{n="test"; e={}}}
if (!$?) {
Throw '{{PowerShellFullLanaguageModeNotConfiguredOnHost}}'
}
|
SAM polling reveals the error returned:
VERBOSE SolarWinds.APM.Probes.CustomPowerShellProbe - <DocumentElement>
<Connection>
<Message>{{PowerShellFullLanaguageModeNotConfiguredOnHost}}</Message>
</Connection>
</DocumentElement>
VERBOSE SolarWinds.APM.Probes.CustomPowerShellProbe - ---
WARN SolarWinds.APM.Probes.CustomPowerShellProbe - Error found in results: At line:1 char:30
+ Select-Object @{n="test"; e={}}
+ ~~
Script block literals are not allowed in restricted language mode or a Data section.
|
Upon checking, the exchange server you are trying to configure for AppInsight for Exchange already has this configured.
IISManager > Sites > default > Powershell > Application Settings, and Add/Change PSLanguageMode to FullLanguage
Product section
Cause
Resolution
- Check to see if you have any arbitration mailboxes on other exchange hosts.
-
This command displays list of servers which hosts arbitration mailboxes:
Get-Mailbox -arbitration | select -expand database -Unique | Get-MailboxDatabase | select -expand activationpreference
-
Make sure that FullLanaguageMode is configured on the other exchange server that hosts such mailboxes.
-
On the other server, navigate to IISManager-->Sites-->default-->Powershell-->Application Settings, and Add/Change PSLanguageMode to FullLanguage.
Run from Command prompt with administrator privileges:
IISRESET
-
Configure AppInsight for Exchange against this server as well.
- Both exchange servers should be up and running.
Note:
- On some cases both the “Default Web Site” and the “Exchange Back End” needs to set to FullLanguageMode.