---
updatedAt: 2025-08-14T13:53:58.000Z
agentTools:
  siteIndex: https://developer.n-able.com/llms.txt
  projectIndex: https://developer.n-able.com/n-sight/llms.txt
---

# Free Physical Memory - N-sight RMM

```powershell Automation Policy
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Policy ID="f8866a5e-4710-4409-8111-a2a84140b823" Name="Free Physical Memory" Description="VGhpcyBBTVAgY2hlY2tzIHdoYXQgUGh5aXNjYWwgTWVtb3J5IGlzIGZyZWUgb24gYSBkZXZpY2UsIGl0IGNhbiBiZSB1c2VkIGFzIGEgY3VzdG9tIHNlcnZpY2UgdG8gZ2VuZXJhdGUgYW4gYWxlcnQsIGlmIGEgdGhyZXNob2xkIGlzIGNyb3NzZWQu" Version="2.19.0.1" MinRequiredVersion="2.19.0.1" RemoteCategory="0" ExecutionType="Local" MinimumPSVersionRequired="0.0.0">
  <Object ID="{cf363e5f-60d4-4a87-88cb-8565f190a290}" Type="{B6FA6D8B-EEAA-47A6-8463-7F9A4F5BBB6E}" Data="&lt;xml&gt;&lt;Parameters&gt;&lt;Parameter ParameterName=&quot;iFailCheckThreshold&quot; Label=&quot;Fail Check if Free Phyiscal Memory is Lower Than x GBs&quot; ParameterType=&quot;number&quot; Value=&quot;3&quot; /&gt;&lt;/Parameters&gt;&lt;/xml&gt;" />
  <LinkManager xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PolicyExecutor">
    <hashset xmlns:d2p1="http://schemas.datacontract.org/2004/07/System" />
  </LinkManager>
  <Diagnostics OriginalVersion="2.96.0.1" />
  <Activity mc:Ignorable="sads sap" x:Class="Policy Builder" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:p="clr-namespace:PolicyExecutor;assembly=PolicyExecutionEngine" xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <x:Members>
      <x:Property Name="PolicyGUID" Type="InArgument(x:String)" />
    </x:Members>
    <sap:VirtualizedContainerService.HintSize>594,1115</sap:VirtualizedContainerService.HintSize>
    <mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
    <p:PolicySequence DisplayName="Policy Builder" sap:VirtualizedContainerService.HintSize="594,1115" MinRequiredVersion="2.19.0.1" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
      <p:PolicySequence.Activities>
        <p:RunPowerShellScript AssemblyName="PolicyExecutionEngine, Version=2.95.0.2, Culture=neutral, PublicKeyToken=null" DisplayName="Run PowerShell Script" sap:VirtualizedContainerService.HintSize="558,348" MinRequiredVersion="2.10.0.19" Moniker="ddfb44a8-d3ad-46aa-abbe-c0b52268b2a0" OutPut_64="[RunPowerShellScript_OutPut_64]" Result="[RunPowerShellScript_Result]" ResultString="[RunPowerShellScript_ResultString]" Results_x64="[RunPowerShellScript_Results_x64]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="ExecuteDebug" TypeName="RunPowerShellScript" genArgEvent="2d2b1242-b3d5-4093-a34b-04d99a7ae00c" m_bTextLinkChange="False" script="IwAgAEcAZQB0ACAAcABlAHIAZgBvAHIAbQBhAG4AYwBlACAAYwBvAHUAbgB0AGUAcgAgAGYAbwByACAAYQB2AGEAaQBsAGEAYgBsAGUAIABtAGUAZwBhAGIAeQB0AGUAcwAgAG8AZgAgAG0AZQBtAG8AcgB5AA0ACgAkAGYAcgBlAGUAUABoAHkAcwBpAGMAYQBsAE0AZQBtAG8AcgB5ACAAPQAgACgARwBlAHQALQBDAG8AdQBuAHQAZQByACAALQBDAG8AdQBuAHQAZQByACAAIgBcAE0AZQBtAG8AcgB5AFwAQQB2AGEAaQBsAGEAYgBsAGUAIABNAEIAeQB0AGUAcwAiACkALgBDAG8AdQBuAHQAZQByAFMAYQBtAHAAbABlAHMALgBDAG8AbwBrAGUAZABWAGEAbAB1AGUADQAKAA0ACgAjACAAQwBvAG4AdgBlAHIAdAAgAGEAdgBhAGkAbABhAGIAbABlACAAbQBlAGcAYQBiAHkAdABlAHMAIAB0AG8AIABnAGkAZwBhAGIAeQB0AGUAcwAgAGEAbgBkACAAcgBvAHUAbgBkACAAaQB0ACAAdABvACAAbwBuAGUAIABkAGUAYwBpAG0AYQBsACAAcABsAGEAYwBlACAAZgBvAHIAIAByAGUAYQBkAGEAYgBpAGwAaQB0AHkADQAKACQAZgByAGUAZQBQAGgAeQBzAGkAYwBhAGwATQBlAG0AbwByAHkARwBCACAAPQAgAFsAbQBhAHQAaABdADoAOgBSAG8AdQBuAGQAKAAkAGYAcgBlAGUAUABoAHkAcwBpAGMAYQBsAE0AZQBtAG8AcgB5ACAALwAgADEAMAAyADQALAAgADIAKQANAAoADQAKACMAIABPAHUAdABwAHUAdAAgAHQAaABlACAAcgBlAHMAdQBsAHQADQAKACQAbwBzAEYAcgBlAGUAUABoAHkAcwBpAGMAYQBsAE0AZQBtAG8AcgB5ACAAPQAgACQAZgByAGUAZQBQAGgAeQBzAGkAYwBhAGwATQBlAG0AbwByAHkARwBCAA==">
          <p:RunPowerShellScript.InArgs>
            <scg:Dictionary x:TypeArguments="x:String, p:InArg" />
          </p:RunPowerShellScript.InArgs>
          <p:RunPowerShellScript.OutArgs>
            <p:OutArg x:Key="osFreePhysicalMemory" ArgType="number" DisplayName="osFreePhysicalMemory" Name="osFreePhysicalMemory">
              <p:OutArg.Arg>
                <OutArgument x:TypeArguments="x:Double">[RunPowerShellScript_osFreePhysicalMemory]</OutArgument>
              </p:OutArg.Arg>
            </p:OutArg>
          </p:RunPowerShellScript.OutArgs>
        </p:RunPowerShellScript>
        <p:IfObject CaseSensitive_ItemProp="{x:Null}" Condition_ItemProp="{x:Null}" Value_Item="{x:Null}" Value_ItemProp="{x:Null}" Variable_ItemProp="{x:Null}" VerboseOutput_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.96.0.1, Culture=neutral, PublicKeyToken=null" CaseSensitive="False" CaseSensitive_DisplayArg="false" CaseSensitive_Item="{x:Null}" Condition="less than" Condition_DisplayArg="less than" Condition_Item="{x:Null}" DisplayName="If" sap:VirtualizedContainerService.HintSize="558,504" MinRequiredVersion="2.19.0.1" Moniker="5b39d98e-a40e-42dc-a3f0-3b16491b4d59" Result="[IfObject_Result]" ResultString="[IfObject_ResultString]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="None" TypeName="IfObject" Value="[iFailCheckThreshold]" Value_DisplayArg="Input Parameters.Fail Check if Free Phyiscal Memory is Lower Than x GBs" Value_Type="x:Double" Variable="[RunPowerShellScript_osFreePhysicalMemory]" Variable_DisplayArg="Run PowerShell Script.osFreePhysicalMemory" Variable_Item="{x:Null}" Variable_Type="x:Double" VerboseOutput="False" VerboseOutput_DisplayArg="" VerboseOutput_Item="{x:Null}" m_bTextLinkChange="False">
          <p:IfObject.IfOption>
            <p:SequenceActivity DisplayName="Then" sap:VirtualizedContainerService.HintSize="222,231" Name="SequenceActivity">
              <p:SequenceActivity.Activities>
                <p:FailPolicy AssemblyName="PolicyExecutionEngine, Version=2.96.0.1, Culture=neutral, PublicKeyToken=null" DisplayName="Fail Policy" sap:VirtualizedContainerService.HintSize="184,81" MinRequiredVersion="2.10.0.19" Moniker="efec9afa-b02e-4b6f-b8d1-2124ab37a252" Result="[FailPolicy_Result]" ResultString="[FailPolicy_ResultString]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="None" TypeName="FailPolicy" m_bTextLinkChange="False" />
              </p:SequenceActivity.Activities>
              <p:SequenceActivity.Variables>
                <Variable x:TypeArguments="x:String" Name="FailPolicy_ResultString" />
                <Variable x:TypeArguments="x:Double" Name="FailPolicy_Result" />
              </p:SequenceActivity.Variables>
            </p:SequenceActivity>
          </p:IfObject.IfOption>
        </p:IfObject>
      </p:PolicySequence.Activities>
      <p:PolicySequence.Variables>
        <Variable x:TypeArguments="x:String" Name="RunPowerShellScript_OutPut_64" />
        <Variable x:TypeArguments="x:String" Name="RunPowerShellScript_ResultString" />
        <Variable x:TypeArguments="scg:IEnumerable(x:Object)" Name="RunPowerShellScript_Results_x64" />
        <Variable x:TypeArguments="x:Double" Name="RunPowerShellScript_Result" />
        <Variable x:TypeArguments="x:Double" Name="RunPowerShellScript_osFreePhysicalMemory" />
        <Variable x:TypeArguments="x:String" Name="IfObject_ResultString" />
        <Variable x:TypeArguments="x:Double" Name="IfObject_Result" />
        <Variable x:TypeArguments="x:Double" Default="5" Name="iFailCheckThreshold" />
      </p:PolicySequence.Variables>
    </p:PolicySequence>
  </Activity>
</Policy>
```

```json Response Example
{"success":true}
```

# SCRIPT