Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Mar 29, 2024 12:38 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
PostPosted: Wed Sep 26, 2007 1:59 am 
Offline
Newbie

Joined: Wed Sep 05, 2007 1:20 am
Posts: 23
Memory info to include empty dimm slots.

Showing how many, if any, empty slots there are without consulting the motherboard manual saves time when planning memory upgrades.

Thank you!


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 26, 2007 2:38 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Sounds like a good plan, do you know if this info is available from WMI?

Basically, the vbscript can look at any WMI class, see http://msdn2.microsoft.com/en-us/library/aa394554.aspx for a list of classes.

I am uncertain if unpopulated memory slots can be enumerated by WMI. Anybody know the answer to this?

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 26, 2007 7:27 am 
I am pretty sure that info can be obtained.


Top
  
Reply with quote  
PostPosted: Thu Oct 11, 2007 9:52 am 
Offline
Newbie

Joined: Sat Mar 17, 2007 5:20 am
Posts: 8
Location: RI, USA
I don't know the best way to get this into the database but this gets the info
[code]

' http://www.wisesoft.co.uk/Scripts/display_script.aspx?id=104

strComputer = "." ' Local computer
strMemory = ""
i = 1

set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory")

For Each objItem In colItems
if strMemory <> "" then strMemory = strMemory & vbcrlf
strMemory = strMemory & "Bank" & i & " : " & (objItem.Capacity / 1048576) & " Mb"
i = i + 1
Next
installedModules = i - 1

Set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray")

For Each objItem in colItems
totalSlots = objItem.MemoryDevices
Next


wscript.echo "Total Slots: " & totalSlots & vbcrlf & _
"Free Slots: " & (totalSlots - installedModules) & vbcrlf & _
vbcrlf & "Installed Modules:" & vbcrlf & strMemory

[/code]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group