Submit a ticketCall us

AnnouncementsSystem Monitoring for Dummies

Tired of monitoring failures disrupting the system, application, and service? Learn the key monitoring concepts needed to help you create sophisticated monitoring and alerting strategies that can help you save time and money. Read the eBook.

Get your free eBook.

Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > Powershell Monitors intermittently return Out Of Memory Exceptions

Powershell Monitors intermittently return Out Of Memory Exceptions

Created by Chris Foley, last modified by carolyn.mazenko on Oct 02, 2018

Views: 1,402 Votes: 0 Revisions: 6

Updated October 2, 2018


This article describes the issue when Windows PowerShell Monitors intermittently return Out of Memory exceptions.


  • SAM 6.2.x and later


Powershell runs out of memory for certain PowerShell scripts. The larger the script, the more CPU and memory resources are required to run it, which can exceed the abilities of the machine running the polling job.


Increase the amount of memory Powershell has by running the following command from a Powershell prompt:

set-item wsman:localhost\Shell\MaxMemoryPerShellMB {amount in MB}


To verify the current amount, run the following command:.

get-item wsman:localhost\Shell\MaxMemoryPerShellMB


Consider hosting the polling engine on a 64-bit system. 64-bit machines have better capabilities in terms of memory management so they can process larger files (for example, over 1 GB) than 32-bit machines. 



Last modified