Submit a ticketCall us

Training ClassSign up for Network Performance Monitor (NPM) and Scalability instructor-led classes

Attend our instructor-led classes, provided by SolarWinds® Academy, to discuss the more advanced monitoring mechanisms available in NPM as well as how to tune your equipment to optimize its polling capabilities. NPM classes offered:
NPM Custom Monitoring and Polling
Orion Platform Scalability

Reserve your seat.

Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > Appinsight for Exchange fails with PowerShell FullLanguageMode is not configured on Remote Host

Appinsight for Exchange fails with PowerShell FullLanguageMode is not configured on Remote Host

Created by Harry Griffiths, last modified by An Kian Wong on Jan 03, 2019

Views: 1,503 Votes: 0 Revisions: 15

Updated May 30, 2016

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

Environment

All SAM versions

Cause 

FullLanaguageMode is not configured on another exchange server from the one that is being configured which relates back to the usage of arbitration mailboxes.

Resolution

  1. Check to see if you have any arbitration mailboxes on other exchange hosts.
  2. This command displays list of servers which hosts arbitration mailboxes:

    Get-Mailbox -arbitration | select -expand database -Unique | Get-MailboxDatabase | select -expand activationpreference  
    
  3. Make sure that FullLanaguageMode is configured on the other exchange server that hosts such mailboxes.

  4. On the other server, navigate to IISManager-->Sites-->default / Exchange-->Powershell-->Application Settings, and Add/Change PSLanguageMode to FullLanguage.

    Run from Command prompt IISRESET with administrator privileges.

  5. Configure AppInsight for Exchange against this server as well.

  6. Both exchange servers should be up and running.

 

 

Last modified

Tags

Classifications

Public