Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

out of memory on one server

$
0
0

When I ran the following code, it errored on out of memoory, but succeeded on other servers. It failed on "ServerL001", the server has 28 GB available memory. What is the problem on this server?

---------------------------------------------------------------------------------------------------------

$computer = "ServerL001"
$namespace = "root\CIMV2"
        Get-WmiObject -class Win32_OperatingSystem -computername $computer -namespace $namespace |  Format-List -property CSName, Caption

----------------------------------------------------------------------------------------------------------------

Get-WmiObject : Out of memory
At C:\Documents and Settings\Wongj\Local Settings\Temp\tmp56D.tmp.ps1:3 char:22
+         Get-WmiObject <<<<  -class Win32_OperatingSystem -computername $compu
ter -namespace $namespace |  Format-List -property CSName, Caption
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], Managemen
   tException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.C
   ommands.GetWmiObjectCommand

PS C:\Program Files\MrEdSoftware\PowerShellScriptOMatic v.1.0>


Viewing all articles
Browse latest Browse all 8411