The simplest way to check your IIS version is through the Internet Information Services (IIS) Manager:
- Click Start > Administrative Tools > Internet Information Services (IIS) Manager
- Right-click your server name in the left pane
- Select Properties
- The version will be displayed in the dialog box
For servers without GUI access or for scripting purposes, use these command line methods:
REM Using WMIC: wmic product where "name like 'Internet Information Services'" get name, version REM Alternative method: %systemroot%\system32\inetsrv\iis.msc /version
You can find precise version information in the Windows Registry:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp] "MajorVersion"=dword:00000006 "MinorVersion"=dword:00000000
For IIS 6.0, MajorVersion will be 6. For IIS 5.0, it will be 5.
Here's a VBScript example to detect IIS version programmatically:
Set objIIS = GetObject("IIS://LocalHost/W3SVC/1") WScript.Echo "IIS Version: " & objIIS.ServerComment ' Alternative method using ADSI: Set objIIS = GetObject("IIS://LocalHost") WScript.Echo "IIS Version: " & objIIS.ServerVersion
For modern administration, use this PowerShell command:
Get-ItemProperty HKLM:\SOFTWARE\Microsoft\InetStp\ | Select-Object MajorVersion, MinorVersion
This will return output like:
MajorVersion MinorVersion ------------ ------------ 6 0
You can also identify IIS version by checking for version-specific features:
- IIS 5.0: Runs as part of inetinfo.exe process
- IIS 6.0: Runs under w3wp.exe worker processes with application pools
- IIS 6.0: Has enhanced metabase (XML configuration)
When working with SSL certificates on Windows Server 2003, knowing your exact IIS version is crucial since configuration steps differ between IIS 5.0 and 6.0. Here are the most reliable methods:
1. Open Internet Information Services (IIS) Manager 2. Right-click the server name in the left pane 3. Select "Properties" 4. The version appears under "Internet Information Services"
For servers without GUI access or automated checks:
@echo off for /f "tokens=*" %%a in ('%systemroot%\system32\inetsrv\iis.msc /version') do ( echo IIS Version: %%a )
A more technical approach via Windows Registry:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp] "MajorVersion"=dword:00000005 "MinorVersion"=dword:00000001
MajorVersion 5 = IIS 5.0, MajorVersion 6 = IIS 6.0
Key differences in SSL handling:
- IIS 5.0: Requires certificate assignment through Web Site Properties
- IIS 6.0: Uses HTTP.SYS for SSL offloading with
httpcfg.exe
For IIS 6.0 SSL binding via command line:
httpcfg set ssl -i 0.0.0.0:443 -h 0000000000000000000000000000000000000000 httpcfg set ssl -i 0.0.0.0:443 -c CERT_SYSTEM_STORE_LOCAL_MACHINE MY -n "CertificateName"
This VBScript checks IIS version and suggests appropriate SSL steps:
Set objIIS = GetObject("IIS://LocalHost/W3SVC") iisVersion = objIIS.ServerComment If InStr(iisVersion, "5.0") Then WScript.Echo "IIS 5.0 detected - use MMC certificate snap-in" ElseIf InStr(iisVersion, "6.0") Then WScript.Echo "IIS 6.0 detected - httpcfg required for SSL binding" End If
- For IIS 5.0, ensure the certificate is installed in the Local Computer store
- IIS 6.0 may require IP-based SSL bindings instead of hostname-based
- Always verify service pack level with
winver.exe