Okay, got it finished. Had to iron out a few wrinkles, and there's probably easier ways to do it, but here's the final code if anyone needs. Modify to suit your particular situation! Again, many MANY thanks to Geates!
'Scrabbled together by Kirk Lowry
'22 May 2011
'modify as required to fit...
When I divide by 1024^3, referencing the TotalVisibleMemorySize from Win32_OperatingSystem, I think it reads in Kb to begin with. On my 2Gb system, using 1024^3 returns "0Gb", whereas 1024^2 returns 2Gb. Testing on the 512Mb system, using 1024^1 returns 512Mb. I thought it was strange, too...
Okay, Geates, you officially rock, in case nobody's told you lately! Did some mad-scientist shifting/tweaking/modding, and Frankenstein's monster officially lives! The script now shows the appropriate Gb or Mb, depending on how much actual memory is in the machine.
'Physical Memory
Set...
Gotcha, thanks for the update. I was scratching my head on the "/" vs "\"!!! Here's what I've got for the Physical Memory portion now, and have tested it on a 2Gb system and a 512Mb system...the 512Mb returns an answer of .498Gb (or something to that effect, after factoring in onboard video...
Having one small problem with the memory section...one of the locations we IT for has about 150 PC's, ranging anywhere from WindowsNT, 95, 98, XP (thankfully they skipped ME) and Windows 7. A good portion of the older machines have less than a Gig of RAM. For some reason, when I run this on a...
Sorry its been so long, as I said I'm working on this between "oh crap" projects/fixes. Finally got the script working, used yours as a template, and to answer some questions I had on my own. Thanks for the help!
'HAMMERED TOGETHER BY KIRK LOWRY, 3/1/2011
'FEEL FREE TO USE/ADJUST TO YOUR...
Hey, first wanted to say that I've browsed the livin' daylights out of these forums, and have learned a TON from them! That being said, I'm about the noob-iest (yep, just made that up) scripter you've ever met, and my boss wants me to learn. His idea of "teaching" is to assign tasks, such as...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.