An unexpected error can occur when GSX Monitor attempts to collect SharePoint information via PowerShell sessions without enough memory allocated. A step may have been missed while configuring SharePoint prerequisites that would set a higher memory allocation limit for PowerShell sessions.
This article describes how to solve the error by modifying the appropriate PowerShell value at the SharePoint server level to increase the memory allocation limit.
- Unexpected error has occurred, please contact firstname.lastname@example.org.
- SharePoint Test Connection results in Warning.
How to Solve the Issue
The default PowerShell session memory limit is 512MB. The following procedure increases the maximum memory allocation for a PowerShell session to 1024MB as recommended in our prerequisites documentation.
- Logon to the SharePoint Server using an Administrator account.
- Open an elevated Windows PowerShell Prompt.
- To check the value for MaxMemoryPerShellMB, use the command:
- If the value is not already 1024, enter the following command to change it:
Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 1024
The value has been modified and GSX Monitor can now scan this SharePoint server successfully.
This modification has to be applied to all monitored members of the SharePoint farm.