Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if WScript.Arguments.Count = 0 then
- strComputer = "."
- else
- strComputer = WScript.Arguments(0)
- end if
- Set wmiObject = GetObject("winmgmts:\\" & strComputer & "\root\cimv2:Win32_PerfFormattedData_PerfOS_Memory=@")
- Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
- Set colCSItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
- For Each objCSItem In colCSItems
- TotalRAM = objCSItem.TotalPhysicalMemory
- Next
- Wscript.Echo "Commited: " & (FormatNumber(wmiObject.CommittedBytes / 1073741824,2)) & " GB, Total RAM: " & FormatNumber(TotalRAM / 1073741824,2) & " GB"
- rem Wscript.Echo "CommitLimit: " & (FormatNumber(wmiObject.CommitLimit / 1073741824,2)) & " GB"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement