Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Collecting information and store into a .cvs file

Status
Not open for further replies.

omegasa

Technical User
Mar 13, 2007
29
RO
Hi,

In my network there are many computers are in and many out of the net into a short period of time. I want to make a script that collect information(computer name, IP, MAC, RAM) about all systems and than store them into a .csv file that can be imported in Excel or into a database.
Can someone tell me which objects must I use and how can I save information into .csv file ?

Thanks in advace
 
There are plenty of WMI scripts posted here and in other forums to gather the information you are looking for. You can also check out this:
WMI Classes to consider: Win32_ComputerSystem, Win32_NetworkAdapterConfiguration, Win32_OperatingSystem

To save to a .csv file use FileSystemObject

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Don't forget you can also pipe your output via the command line.
Somewhere in your code:
eg. WscriptEcho strComputer & ", " & Item.CPU & ","

Then when you run the script....

c:\cscript ServerCPU.vbs > CPUReport.csv
 

Can someone recommend me a free VBScript ebook ? Or a site from which I can download one ? ON the Internet I've found only splited information.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top