Server Inventory Script

I have been working on a number of projects lately where I need to touch most of the servers in our environment; be it changing DNS servers, or querying event logs, I needed a way to get every live server out there.

The attached script will query AD for all servers, then if pingable, it will attempt to gather more info via WMI. The final result is output to a CSV file in the C:\ root of the local computer.

  • Server name
  • OS version
  • Last Service Pack # applied (not patch version)
  • MAC Address, IP and DNS configuration for each active NIC
  • Drive letter and %Free space from each

On servers not running WMI, it will attempt to do a DOS Ping and then run NBTStat to gather the IP and MAC address.

AttachmentSize
GetServerInfo_dyna.vbs_.txt7.38 KB

Comments

I would suggest looking into

I would suggest looking into the SysInternals tool PSInfo. It has a number of command-line switches to provide the data you are looking for and have it appended to a CSV file for you.. Best of all, it's free!

need help

Hi there,

i am new to the scripting and i need in addition to above data being captured from a server, is there a way to capture ram, sw installed and services running on a server.

could you pls add other commands to the script and e-mail it to (lily8@mail.com) , i would appreciate it, also from where should i run the script!

Thanks

i need your help, in

i need your help, in addition to above data being captured from a server, is there a way to capture ram, sw installed and services running on a server then all info exported to excel?

Thanks

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <blockquote> <center> <hr> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <drupal6>, <html>, <java>, <javascript>, <php>, <posh>.

More information about formatting options