Monday, December 30, 2013

Physical Memory Capacity using Powershell and WMI

A small Script to fetch Physical Memory installed/mounted on the host as below. It gives you the Slots,DIMM number and capacity of the RAM in GB for the Remote Hosts using WMI. Copy the below contents [ In Green] to the notepad and save it as .ps1 file with name of your choice.
How to Run:
  • Run PowerShell from start—>Run—>Type PowerShell and hit Enter
  • Go the location where the script file is saved. CD “location path”
  • type .\filename.ps1 “Hostname”
Ex: .\filename.ps1 shashank where, .\filename.ps1 is script and shashank is the host for which you want to compute the Physical Memory Availability.
#Author:Shashanka Haritsa @ February 2011
#Script will fetch DIMMS and their Physical Memory Capacity
$count = 0
$memories = get-wmiobject win32_physicalmemory -computername $args
foreach ($Dimm in $memories){
$Dimm.BankLabel + ” ” + $Dimm.DeviceLocator +” Capacity = ” + $Dimm.Capacity/(1024*1024*1024) + “GB”
$Count = $Count + 1
“Found Totally ” + $Count + ” Installed Memory Modules”
I hope this helps to gather the information required from Remote hosts in Faster way.

1 comment:

  1. As must be expected from an organization whose background is so firmly rooted in 퍼스트카지노 hospitality, they're leaders for rewarding each their regular and occasional gamers. With the hundreds of thousands of potential combos of software program, hardware and network would possibly be} in use right now, every so often some customers will expertise technical points with BetBlocker. While we might be more than happy to have our Development Team investigate your concern and supply an answer as shortly as potential, this may take a while. We won't remove the app until is not a|there is not any} different way of resolving your concern.