Hello,
I am running SCOM 2012 R2. I would like to know if there is a Powershell command to retrieve the amount of physical memory in my clients. I need to know which computers are under 8GB so I can upgrade them.
Technology Tips and News
Hello,
I am running SCOM 2012 R2. I would like to know if there is a Powershell command to retrieve the amount of physical memory in my clients. I need to know which computers are under 8GB so I can upgrade them.
Get-WMIObject -class win32_physicalmemory -computer $computer | where { $_.capacity -lt "8000000000"}
Hello,
I tried your command and I get:
Get-WmiObject : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty
I am looking for a way to list all of the computers in one column and their physical memory in another column. I currently do that with their MAC addresses so I would like the same results if it's possible.
Hello,
Can you please give me instructions on how to apply this? Im not too familiar with Powershell.
Hello,
Unfortunately I do not have access to the AD servers. I have to be able to do it solely through SCOM. Btw..I love #9 and #10. You should add #11. May The Force be with you.
Hello,
When I run this I get the following:
Get-WmiObject : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
At C:\Memory.PS1:11 char:18
+ Get-WMIObject <<<< -class win32_physicalmemory -computer $Computer.displayname | where { $_.capacity -lt "800000
0000"} | Format-Table pscomputername, capacity -a
+ CategoryInfo : NotSpecified: (:) [Get-WmiObject], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
Hello,
As I ran it again, I realized what was going on. This process runs and queries each client instead of querying the SCOM DB. That's why I got the RPC error, because it scanned a conputer that was off. Am I correct? If that's the case, then this wont work for me. I was looking for something similar to the way I retrieve MAC and IP addresses, which is from the DB and not a query of each computer. Is it possible to do it with memory as well?
There are two ways to display SCOM agent physical memory
1) Using operations console --> Monitoring --> Discovered Inventory and change it type into Windows Server Operating System
2) Using the following powershell
get-scomclass -displayname 'Windows Server Operating System' | get-scomclassinstance |ft ``[Microsoft.Windows.OperatingSystem`].physicalMemory, ``[Microsoft.Windows.Computer`].PrincipalName
Roger
There are two ways to display SCOM agent physical memory
1) Using operations console --> Monitoring --> Discovered Inventory and change it type into Windows Server Operating System
2) Using the following powershell
get-scomclass -displayname 'Windows Server Operating System' | get-scomclassinstance |ft ``[Microsoft.Windows.OperatingSystem`].physicalMemory, ``[Microsoft.Windows.Computer`].PrincipalName
Roger
There are two ways to display SCOM agent physical memory
1) Using operations console --> Monitoring --> Discovered Inventory and change it type into Windows Server Operating System
2) Using the following powershell
get-scomclass -displayname 'Windows Server Operating System' | get-scomclassinstance |ft ``[Microsoft.Windows.OperatingSystem`].physicalMemory, ``[Microsoft.Windows.Computer`].PrincipalName
Roger
Hello,
They both worked like a charm. Thank you so much.