en-us/MemoryTools-help.xml
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh"> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-MemoryPerformance</command:name> <command:verb>Get</command:verb> <command:noun>MemoryPerformance</command:noun> <maml:description> <maml:para>Get memory information from performance counters</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Use this command to simplify the process of getting data from memory-related performance counters.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-MemoryPerformance</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect to a CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-MemoryPerformance</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>Enter the name of a computer to connect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect to a CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>Enter the name of a computer to connect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>Microsoft.Management.Infrastructure.CimSession[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Object</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-MemoryPerformance AvailableBytes : 17207111680 AvailableKBytes : 16803820 AvailableMBytes : 16409 CacheBytes : 374910976 CacheBytesPeak : 627560448 CacheFaultsPersec : 6419 CommitLimit : 39345614848 CommittedBytes : 21974437888 DemandZeroFaultsPersec : 741 FreeAndZeroPageListBytes : 696127488 FreeSystemPageTableEntries : 12267190 LongTermAverageStandbyCacheLifetimes : 14400 ModifiedPageListBytes : 24715264 PageFaultsPersec : 7204 PageReadsPersec : 0 PagesInputPersec : 0 PagesOutputPersec : 0 PagesPersec : 0 PageWritesPersec : 0 PercentCommittedBytesInUse : 55 PoolNonpagedAllocs : 1182049 PoolNonpagedBytes : 559136768 PoolPagedAllocs : 1398128 PoolPagedBytes : 831823872 PoolPagedResidentBytes : 741318656 StandbyCacheCoreBytes : 155684864 StandbyCacheNormalPriorityBytes : 9012703232 StandbyCacheReserveBytes : 7342587904 SystemCacheResidentBytes : 374902784 SystemCodeResidentBytes : 0 SystemCodeTotalBytes : 0 SystemDriverResidentBytes : 12992512 SystemDriverTotalBytes : 29093888 TransitionFaultsPersec : 83 TransitionPagesRePurposedPersec : 0 WriteCopiesPersec : 0 DateTime : 11/21/2020 12:17:16 PM ComputerName : WIN10Desktop</dev:code> <dev:remarks> <maml:para>Get all memory counters for the local computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-MemoryPerformance -Computername $c | Select Computername,%CommittedBytes*,AvailableMBytes,CacheBytes Computername %CommittedBytesInUse AvailableMbytes CacheBytes ------------ -------------------- --------------- ---------- CHI-HVR1 7.05788756820636 14839 99377152 CHI-HVR2 16.8986961377323 13144 83001344 CHI-P50 24.753204334977 47143 94998528 CHI-DC04 47.8621563768474 1030 180101120 Win10-ENT-01 79.914213523203 1545 96137216</dev:code> <dev:remarks> <maml:para>Get selected performance data from multiple computers defined in variable c.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://bit.ly/2TrAq9d</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-Counter</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-MemoryUsage</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-MemoryUsage</command:name> <command:verb>Get</command:verb> <command:noun>MemoryUsage</command:noun> <maml:description> <maml:para>Get a snapshot of memory usage.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command will write a custom memory utilization object to the pipeline that indicates the current memory state. The criteria for what is normal or not is based on the $MemoryToolsOK and $MemoryToolsWarning global variable values. You can modify these values from the console.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-MemoryUsage</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect using an existing CIMSession</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Status</maml:name> <maml:description> <maml:para>Filter on a given status.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">All</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">OK</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Warning</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Critical</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>All</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-MemoryUsage</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>Specify the name of the computer or computers to query.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Status</maml:name> <maml:description> <maml:para>Filter on a given status.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">All</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">OK</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Warning</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Critical</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>All</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect using an existing CIMSession</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>Specify the name of the computer or computers to query.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Status</maml:name> <maml:description> <maml:para>Filter on a given status.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>All</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>Microsoft.Management.Infrastructure.CimSession[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MyMemoryUsage</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-MemoryUsage -computername Thinkp1 Computername Status PctFree FreeGB TotalGB ------------ ------ ------- ------ ------- THINKP1 OK 83.66 26.39 32</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-MemoryUsage dom1,srv1,srv2,win10 -Status Warning Computername Status PctFree FreeGB TotalGB ------------ ------ ------- ------ ------- WIN10 Warning 36.57 1.17 3</dev:code> <dev:remarks> <maml:para>Get usage from several computers but filter and only display those with a Warning.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> Get-MemoryUsage dom1,srv1,srv2,win10 | Format-Table -view show</dev:code> <dev:remarks> <maml:para>Display a similar table as the previous example, but highlight using ANSI escape sequences.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://bit.ly/2TpnLDV</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Show-MemoryUsage</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-MemoryUsage</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-TopProcessMemory</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-PhysicalMemory</command:name> <command:verb>Get</command:verb> <command:noun>PhysicalMemory</command:noun> <maml:description> <maml:para>Get physical memory details.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command will query the Win32_PhysicalMemory class to get hardware details about installed memory. The command writes a custom object to the pipeline.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-PhysicalMemory</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect via an existing CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-PhysicalMemory</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>Specify the name of a computer or computers to query.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect via an existing CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>Specify the name of a computer or computers to query.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>Microsoft.Management.Infrastructure.CimSession[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>physicalMemoryUnit</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-PhysicalMemory Computername: PROSPERO Manufacturer CapacityGB Form ClockSpeed Voltage Location ------------ ---------- ---- ---------- ------- -------- Crucial 32 SODIMM 2666 1200 ChannelA-DIMM0 Crucial 32 SODIMM 2666 1200 ChannelB-DIMM0</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-Physicalmemory -Computername thinkp1,prospero Computername: THINKP1 Manufacturer CapacityGB Form ClockSpeed Voltage Location ------------ ---------- ---- ---------- ------- -------- Samsung 16 SODIMM 2667 1200 ChannelA-DIMM0 Micron 16 SODIMM 2667 1200 ChannelB-DIMM0 Computername: PROSPERO Manufacturer CapacityGB Form ClockSpeed Voltage Location ------------ ---------- ---- ---------- ------- -------- Crucial 32 SODIMM 2666 1200 ChannelA-DIMM0 Crucial 32 SODIMM 2666 1200 ChannelB-DIMM0</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> Get-Cimsession | Get-PhysicalMemory Computername: WIN10 Manufacturer CapacityGB Form ClockSpeed Voltage Location ------------ ---------- ---- ---------- ------- -------- Microsoft Corporation 2 Unknown 0 0 M0001 Computername: SRV1 Manufacturer CapacityGB Form ClockSpeed Voltage Location ------------ ---------- ---- ---------- ------- -------- Microsoft Corporation 2 Unknown 0 0 M0001 Computername: DOM1 Manufacturer CapacityGB Form ClockSpeed Voltage Location ------------ ---------- ---- ---------- ------- -------- Microsoft Corporation 3.875 Unknown 0 0 M0001 Microsoft Corporation 4.125 Unknown 0 0 M0002</dev:code> <dev:remarks> <maml:para>Pipe existing CIMSessions to the command. This example querying Hyper-V virtual machines so the results are a bit different.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://bit.ly/2HAmHKD</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-ProcessMemory</command:name> <command:verb>Get</command:verb> <command:noun>ProcessMemory</command:noun> <maml:description> <maml:para>Get a snapshot of a process' memory usage.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Get a snapshot of a process' memory usage based on its workingset value. You can get the same information using Get-Process or by querying the Win32_Process WMI class with Get-CimInstance. This command uses Invoke-Command to gather the information remotely. Many of the parameters are from that cmdlet.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-ProcessMemory</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The process name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>*</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Computername</maml:name> <maml:description> <maml:para>The name of a remote computer.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>$env:COMPUTERNAME</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Credential</maml:name> <maml:description> <maml:para>A credential for the remote computer.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>ThrottleLimit</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Authentication</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The process name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>*</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Computername</maml:name> <maml:description> <maml:para>The name of a remote computer.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>$env:COMPUTERNAME</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Credential</maml:name> <maml:description> <maml:para>A credential for the remote computer.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>ThrottleLimit</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Authentication</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>[string[]]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>myProcessMemory</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>PS C:\> Get-ProcessMemory code,powershell* Name Count Threads AvgMB SumMB Computername ---- ----- ------- ----- ----- ------------ Code 9 154 112.8199 1015.3789 BOVINE320 powershell 3 77 179.1367 537.4102 BOVINE320 powershell_ise 1 21 242.0586 242.0586 BOVINE320</dev:code> <dev:remarks> <maml:para>The default output displays the process name, the total process count, the total number of threads, the average workingset value per process in MB and the total workingset size of all processes also formatted in MB.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>PS C:\> Get-ProcessMemory -computername srv1,srv2,dom1 -Name lsass -cred company\artd Name Count Threads AvgMB SumMB Computername ---- ----- ------- ----- ----- ------------ lsass 1 30 60.1719 60.1719 DOM1 lsass 1 7 10.8594 10.8594 SRV1 lsass 1 7 9.6953 9.6953 SRV2</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <dev:code>PS C:\> Get-ProcessMemory *ActiveDirectory* -Computername dom1 | Select-Object * Name : Microsoft.ActiveDirectory.WebServices Count : 1 Threads : 10 Average : 46940160 Sum : 46940160 Computername : DOM1</dev:code> <dev:remarks> <maml:para>This example uses a wildcard for the process name because the domain controller only has one related process. The output shows the raw values.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <dev:code>PS C:\> Get-ProcessMemory *edge*,firefox,chrome | sort sum -Descending Name Count Threads AvgMB SumMB Computername ---- ----- ------- ----- ----- ------------ firefox 6 189 180.4134 1082.4805 BOVINE320 chrome 8 124 67.1377 537.1016 BOVINE320 MicrosoftEdgeCP 4 171 66.1846 264.7383 BOVINE320 MicrosoftEdge 1 37 70.1367 70.1367 BOVINE320 MicrosoftEdgeSH 1 10 8.2734 8.2734 BOVINE320</dev:code> <dev:remarks> <maml:para>Get browser processes and sort on the underlying SUM property in descending order.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Get-Process</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-TopProcessMemory</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-TopProcessMemory</command:name> <command:verb>Get</command:verb> <command:noun>TopProcessMemory</command:noun> <maml:description> <maml:para>Display processes using the most memory based on WorkingSet.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command will use Get-CimInstance to retrieve the top processes by WorkingSet. It will retrieve the top 5 by default. The output will include a percentage of total in-use memory the process is using as well as the process owner.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-TopProcessMemory</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect via an existing CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Top</maml:name> <maml:description> <maml:para>The number of processes to retrieve. There is a maximum value of 25.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>5</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-TopProcessMemory</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>The name of a computer or computers to query.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Top</maml:name> <maml:description> <maml:para>The number of processes to retrieve. There is a maximum value of 25.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>5</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect via an existing CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>The name of a computer or computers to query.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Top</maml:name> <maml:description> <maml:para>The number of processes to retrieve. There is a maximum value of 25.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>5</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>Microsoft.Management.Infrastructure.CimSession[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>topProcessMemoryUnit</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-TopProcessMemory -top 1 Computername: PROSPERO ProcessID : 3060 Name : powershell.exe WS(MB) : 1455.89 PctUsed : 4.8277 Owner : PROSPERO\Jeff Commandline : "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Version 5.1 -s -NoLogo -NoProfile</dev:code> <dev:remarks> <maml:para>Get the top process for the local computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-Cimsession | Get-TopProcessMemory | Sort Owner | Format-Table -GroupBy Owner -Property ProcessID,Name,WS,PctUsed Owner: COMPANY\ArtD Computername ProcessID Name WS PctUsed ------------ --------- ---- -- ------- WIN10 3520 powershell.exe 153464832 14.2925 Owner: NT AUTHORITY\SYSTEM Computername ProcessID Name WS PctUsed ------------ --------- ---- -- ------- WIN10 2396 MsMpEng.exe 164093952 15.2824 WIN10 1400 svchost.exe 65187840 6.0711 WIN10 984 LogonUI.exe 55332864 5.1533 WIN10 1056 svchost.exe 47890432 4.4601</dev:code> <dev:remarks> <maml:para>Use an existing CIMSession and get the top 5 processes. The output is sorted by the Owner property and formatted as a table.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://bit.ly/34y1oCF</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-MemoryUsage</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Show-MemoryUsage</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Show-MemoryUsage</command:name> <command:verb>Show</command:verb> <command:noun>MemoryUsage</command:noun> <maml:description> <maml:para>Display a colorized version of memory usage.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This is a variation of the Get-MemoryUsage command. This version displays a colorized and formatted table using a custom view. Normal values will be displayed in green. Warnings will be displayed in yellow and Critical systems in red. The criteria for what is normal or not is based on the $MemoryToolsOK and $MemoryToolsWarning global variable values. You can modify these values from the console.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Show-MemoryUsage</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect to an existing CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Show-MemoryUsage</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>The name of a computer or computers to query.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect to an existing CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>The name of a computer or computers to query.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>Microsoft.Management.Infrastructure.CimSession[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>This command creates a formatted table</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> show-memoryusage -Computername Dom1,Srv1,Srv2,Win10 **************** Memory Check **************** Computername Status PctFree FreeGB TotalGB ------------ ------ ------- ------ ------- DOM1 OK 99.92 1023.2 1024 SRV1 OK 99.96 1023.63 1024 SRV2 OK 99.95 1023.51 1024 WIN10 Warning 36.89 1.19 3</dev:code> <dev:remarks> <maml:para>The line for Win10 would be displayed in Yellow. The other computers would be displayed in Green.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://bit.ly/2Tp7IWy</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-MemoryUsage</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Test-MemoryUsage</command:name> <command:verb>Test</command:verb> <command:noun>MemoryUsage</command:noun> <maml:description> <maml:para>Test if a computer meets a specific memory threshold.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command can be used to test if memory utilization meets some criteria. There are several parameter sets for different tests. All of them can be used with -Quiet to return a simple Boolean value.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Test-MemoryUsage</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect to an existing CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>Suppress details and return a Boolean value.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>UsedGB</maml:name> <maml:description> <maml:para>Enter the minimum amount of used memory in GB</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Double</command:parameterValue> <dev:type> <maml:name>Double</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-MemoryUsage</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect to an existing CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>Suppress details and return a Boolean value.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>TotalGB</maml:name> <maml:description> <maml:para>Enter the minimum total memory in GB</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-MemoryUsage</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect to an existing CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>FreeGB</maml:name> <maml:description> <maml:para>Enter the minimum free memory in GB.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Double</command:parameterValue> <dev:type> <maml:name>Double</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>Suppress details and return a Boolean value.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-MemoryUsage</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect to an existing CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>PercentFree</maml:name> <maml:description> <maml:para>Enter the minimum % free memory</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>50</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>Suppress details and return a Boolean value.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-MemoryUsage</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>Enter the name of a computer or computers to test.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>PercentFree</maml:name> <maml:description> <maml:para>Enter the minimum % free memory</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>50</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>Suppress details and return a Boolean value.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-MemoryUsage</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>Enter the name of a computer or computers to test.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>Suppress details and return a Boolean value.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>UsedGB</maml:name> <maml:description> <maml:para>Enter the minimum amount of used memory in GB</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Double</command:parameterValue> <dev:type> <maml:name>Double</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-MemoryUsage</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>Enter the name of a computer or computers to test.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>Suppress details and return a Boolean value.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>TotalGB</maml:name> <maml:description> <maml:para>Enter the minimum total memory in GB</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-MemoryUsage</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>Enter the name of a computer or computers to test.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>FreeGB</maml:name> <maml:description> <maml:para>Enter the minimum free memory in GB.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Double</command:parameterValue> <dev:type> <maml:name>Double</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>Suppress details and return a Boolean value.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>CimSession</maml:name> <maml:description> <maml:para>Connect to an existing CimSession.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="cn"> <maml:name>Computername</maml:name> <maml:description> <maml:para>Enter the name of a computer or computers to test.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>FreeGB</maml:name> <maml:description> <maml:para>Enter the minimum free memory in GB.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Double</command:parameterValue> <dev:type> <maml:name>Double</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>PercentFree</maml:name> <maml:description> <maml:para>Enter the minimum % free memory</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>50</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>Suppress details and return a Boolean value.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>TotalGB</maml:name> <maml:description> <maml:para>Enter the minimum total memory in GB</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>UsedGB</maml:name> <maml:description> <maml:para>Enter the minimum amount of used memory in GB</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Double</command:parameterValue> <dev:type> <maml:name>Double</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Object</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Test-MemoryUsage Computername PctFree Test ------------ ------- ---- BOVINE320 50.53 True</dev:code> <dev:remarks> <maml:para>Run the default test on the local computer. The default percentage threshold is 50%.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Test-MemoryUsage -FreeGB 16 Computername FreeGB Test ------------ ------ ---- BOVINE320 15.93 False</dev:code> <dev:remarks> <maml:para>Test if the computer has at least 16GB of free memory.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> Test-MemoryUsage -computername CHI-P50 -TotalGB 32 -Quiet True</dev:code> <dev:remarks> <maml:para>Test if the computer has at least 32GB of memory but only return True or False.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 4 --------------------------</maml:title> <dev:code>PS C:\> Test-MemoryUsage -UsedGB 20 Computername UsedGB Test ------------ ------ ---- BOVINE320 15.74 False</dev:code> <dev:remarks> <maml:para>Test if the computer is using at least 20GB of memory.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://bit.ly/2TFkXml</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-MemoryUsage</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-MemoryPerformance</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-TopProcessMemory</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |