Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Retrieve memory information

Reply
 
Old 01-28-2009   #1 (permalink)
adao


 
 

Retrieve memory information

Hello,

I need to retrieve information about physical memory from all computers in
our organization (DIMM Banks, Total, Free, Type of memory, SIMM, DIMM, SDRAM,
speed, fsb, capacity, etc), so i could plan a upgrade memory.

So, i'm looking for a script thar retrive this information for a set of
computers.

Rgs,
Adao


My System SpecsSystem Spec
Old 01-28-2009   #2 (permalink)
hb21l6


 
 

Re: Retrieve memory information

do a google search for script-o-matic and it should show you the
Hey-scriting guy HTA that you can download and its packed with scripts,
well, generated from the WMI anyway..

if this doesnt work, then what you need will be in script-o-matic..


On Error Resume Next

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

arrComputers = Array("MYPCNAME",'MYPCNAME', 'ETC')
For Each strComputer In arrComputers
WScript.Echo
WScript.Echo "=========================================="
WScript.Echo "Computer: " & strComputer
WScript.Echo "=========================================="

Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_MemoryDevice", "WQL", _
wbemFlagReturnImmediately +
wbemFlagForwardOnly)

For Each objItem In colItems
WScript.Echo "Access: " & objItem.Access
strAdditionalErrorData = Join(objItem.AdditionalErrorData, ",")
WScript.Echo "AdditionalErrorData: " & strAdditionalErrorData
WScript.Echo "Availability: " & objItem.Availability
WScript.Echo "BlockSize: " & objItem.BlockSize
WScript.Echo "Caption: " & objItem.Caption
WScript.Echo "ConfigManagerErrorCode: " &
objItem.ConfigManagerErrorCode
WScript.Echo "ConfigManagerUserConfig: " &
objItem.ConfigManagerUserConfig
WScript.Echo "CorrectableError: " & objItem.CorrectableError
WScript.Echo "CreationClassName: " & objItem.CreationClassName
WScript.Echo "Description: " & objItem.Description
WScript.Echo "DeviceID: " & objItem.DeviceID
WScript.Echo "EndingAddress: " & objItem.EndingAddress
WScript.Echo "ErrorAccess: " & objItem.ErrorAccess
WScript.Echo "ErrorAddress: " & objItem.ErrorAddress
WScript.Echo "ErrorCleared: " & objItem.ErrorCleared
strErrorData = Join(objItem.ErrorData, ",")
WScript.Echo "ErrorData: " & strErrorData
WScript.Echo "ErrorDataOrder: " & objItem.ErrorDataOrder
WScript.Echo "ErrorDescription: " & objItem.ErrorDescription
WScript.Echo "ErrorGranularity: " & objItem.ErrorGranularity
WScript.Echo "ErrorInfo: " & objItem.ErrorInfo
WScript.Echo "ErrorMethodology: " & objItem.ErrorMethodology
WScript.Echo "ErrorResolution: " & objItem.ErrorResolution
WScript.Echo "ErrorTime: " & WMIDateStringToDate(objItem.ErrorTime)
WScript.Echo "ErrorTransferSize: " & objItem.ErrorTransferSize
WScript.Echo "InstallDate: " &
WMIDateStringToDate(objItem.InstallDate)
WScript.Echo "LastErrorCode: " & objItem.LastErrorCode
WScript.Echo "Name: " & objItem.Name
WScript.Echo "NumberOfBlocks: " & objItem.NumberOfBlocks
WScript.Echo "OtherErrorDescription: " & objItem.OtherErrorDescription
WScript.Echo "PNPDeviceID: " & objItem.PNPDeviceID
strPowerManagementCapabilities =
Join(objItem.PowerManagementCapabilities, ",")
WScript.Echo "PowerManagementCapabilities: " &
strPowerManagementCapabilities
WScript.Echo "PowerManagementSupported: " &
objItem.PowerManagementSupported
WScript.Echo "Purpose: " & objItem.Purpose
WScript.Echo "StartingAddress: " & objItem.StartingAddress
WScript.Echo "Status: " & objItem.Status
WScript.Echo "StatusInfo: " & objItem.StatusInfo
WScript.Echo "SystemCreationClassName: " &
objItem.SystemCreationClassName
WScript.Echo "SystemLevelAddress: " & objItem.SystemLevelAddress
WScript.Echo "SystemName: " & objItem.SystemName
WScript.Echo
Next
Next


Function WMIDateStringToDate(dtmDate)
WScript.Echo dtm:
WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) & "/" & _
Mid(dtmDate, 7, 2) & "/" & Left(dtmDate, 4) _
& " " & Mid (dtmDate, 9, 2) & ":" & Mid(dtmDate, 11, 2) & ":" &
Mid(dtmDate,13, 2))
End Function

"adao" <adao@xxxxxx> wrote in message
news:3625C86A-E592-4DB0-92E7-7E13AF93AB29@xxxxxx
Quote:

> Hello,
>
> I need to retrieve information about physical memory from all computers in
> our organization (DIMM Banks, Total, Free, Type of memory, SIMM, DIMM,
> SDRAM,
> speed, fsb, capacity, etc), so i could plan a upgrade memory.
>
> So, i'm looking for a script thar retrive this information for a set of
> computers.
>
> Rgs,
> Adao
>
My System SpecsSystem Spec
Old 01-28-2009   #3 (permalink)
Richard Mueller [MVP]


 
 

Re: Retrieve memory information


"adao" <adao@xxxxxx> wrote in message
news:3625C86A-E592-4DB0-92E7-7E13AF93AB29@xxxxxx
Quote:

> Hello,
>
> I need to retrieve information about physical memory from all computers in
> our organization (DIMM Banks, Total, Free, Type of memory, SIMM, DIMM,
> SDRAM,
> speed, fsb, capacity, etc), so i could plan a upgrade memory.
>
> So, i'm looking for a script thar retrive this information for a set of
> computers.
>
> Rgs,
> Adao
>
Examples from the Script Center to retrieve information on memory:

http://www.microsoft.com/technet/scr.../dminvb04.mspx

processor information:

http://www.microsoft.com/technet/scr.../dminvb03.mspx

You can navigate in the TOC at the left in these links to other examples. A
VBScript example that retrieves information on all computers in a group is
linked below. You can modify this to use the WMI classes referred to above:

http://www.rlmueller.net/Inventory.htm

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Retrieve U3 Usb Information Drivers
Retrieve information of a remote machine in vbscript VB Script
Retrieve Windows System Information. .NET General
Retrieve file version information PowerShell
How to retrieve the information provider by the HelpMessage attrib PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46