Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Find the version of IIS installed in all machines in the file.

Posted on 2007-10-12
2
Medium Priority
?
3,225 Views
Last Modified: 2008-01-09
Hi,

Find the version of IIS installed in all machines in the file.
Any script to query with each machine and get these details.

Regards
Sharath
0
Comment
Question by:bsharath
2 Comments
 
LVL 1

Expert Comment

by:billy_sodot
ID: 20073275
I'm not sure I unserstand the problem.
Anyway:
If you are running Windows Server 2003, you are running IIS 6.0
If you are running Windows XP, you are running IIS 5.1
If you are running Windows 2000, you are running IIS 5.0
If you are running Windows NT 4.0 or Windows 9x, you can determine which version of IIS / PWS you are running by one of the following methods:
<%
    response.write(Request.ServerVariables("SERVER_SOFTWARE"))
    ' returns "Microsoft-IIS/4.0" for IIS 4.0 + ASP 2.0
%>

OR
 
Do a search for ASP.DLL on your system
right-click it and select Properties
Check the version tab:

IIS 3.0 shows 1.x
IIS 4.0 shows 2.x
IIS 5.0 shows 5.0.2195.x
IIS 5.1 shows 5.1.2600.x
IIS 6.0 shows 6.0.3790.x

(Taken from http://classicasp.aspfaq.com/general/how-do-i-determine-which-version-of-iis/asp-i-m-running.html)
0
 
LVL 26

Accepted Solution

by:
Farhan Kazi earned 2000 total points
ID: 20074788
:: ================
:: READ THIS FIRST
:: ================
:: * To run this script you must have domain administrators rights.
:: * This script require "Computers.txt" file from where it will pick computer names.
:: * Successful run will generate "IISVersionInfo.txt"
:: * Copy and Paste following script into notepad and save it with any name having .cmd extension.
:: SCRIPT START
@ECHO OFF
SETLOCAL EnableDelayedExpansion
IF NOT EXIST Computers.txt GOTO ShowErr
FOR %%R IN (Computers.txt) DO IF %%~zR EQU 0 GOTO ShowErr
IF EXIST IISVersionInfo.txt DEL /F /Q IISVersionInfo.txt
FOR /F %%c IN ('TYPE Computers.txt') DO (
    ECHO Processing: %%c
      PING -n 1 -w 800 %%c|Find /I "TTL" >NUL
      IF NOT ERRORLEVEL 1 (
            SC \\%%c QUERY |FIND /I "IISADMIN" >NUL
            IF NOT ERRORLEVEL 1 (
                  SET Qry=WMIC /NODE:"%%c" /NAMESPACE:"\\root\MicrosoftIISv2" PATH IIsWebInfo GET MajorIIsVersionNumber, MinorIIsVersionNumber, Status /FORMAT:CSV
                  FOR /F "Skip=1 tokens=1-3 delims=," %%x IN ('!Qry! 2^>NUL ^|FIND ","') DO ECHO %%x: IIS version %%y.%%z>>IISVersionInfo.txt
            ) ELSE ( ECHO %%c: *ERROR* IIS Service Not Found.>>IISVersionInfo.txt)
      )ELSE (ECHO Unable to connect '%%c'))
GOTO EndScript
:ShowErr
ECHO "Computers.txt" file does not exist or file is empty!
:EndScript
ENDLOCAL
:: *** SCRIPT END ***
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

578 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