Need script to pull system info from servers.

Posted on 2007-10-05
Last Modified: 2012-08-13
Hello, I am not a scripter by any means. I have a project that requires me to get some info from a set list of servers. What I need is Make, Model, Serial Number, # and Speed of physical processors, Memory, Total disk, Used disk, OS version, and Domain. I was wondering if any of you incredibly talented scriptors have something like this in your collections. Thanks in advance.
Question by:Macom
    LVL 30

    Accepted Solution

    Could do something like this in a batch file:

    @echo off


    set inFile=%~1

    if "%~1"=="" set /p inFile=Please enter the server list file:
    if "%inFile%"=="" echo Processing aborted&goto :EOF

    if not exist "%inFile%" echo %inFile% does not exist&goto :EOF

    for /f "tokens=*" %%a in ('type "%inFile%"') do echo Server: %%a&wmic /node:%%a computersystem get Manufacturer,Model /value

    You can get the various field names by doing this:

    wmic /node:computername computersystem get /?
    wmic /node:computername cpu /?
    LVL 12

    Expert Comment

    Someone posted a script here that grabs information from servers and posts back XML data:


    Author Comment

    Thanks Steve. This solution was very workable with my limited scripting capabilities and provides many other possibilities too.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
    Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  ( Here (http…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now