Advertisement
Guest User

Untitled

a guest
Jul 12th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. strComputer = "."
  2. Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
  3. Set colItems = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_PerfOS_Memory",,48)
  4. GB = 1024 *1024 * 1024
  5. For Each objItem in colItems
  6. Wscript.Echo "Available GB: " & Round(objItem.AvailableBytes / GB,3)
  7. Wscript.Echo "CommitLimit GB: " & Round(objItem.CommitLimit / GB,3)
  8. Wscript.Echo "Committed GB: " & Round(objItem.CommittedBytes / GB,3)
  9. Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement