Home » How to Get IIS Version using PowerShell

How to Get IIS Version using PowerShell

Internet Information Services (IIS) is a web server developed by Microsoft. It is used to host websites and web applications on Windows servers. Knowing the version of IIS installed on your server is crucial for maintenance, troubleshooting, and ensuring compatibility with your applications.

PowerShell provides the simplest way to retrieve the IIS version installed on your system.

In this article, we will discuss the steps to get the IIS version using PowerShell.

Get IIS Version Using the Registry Method in PowerShell

One of the simplest ways to get the IIS version is by querying the Windows Registry.

Follow the below steps to find the IIS version using PowerShell.

  1. Open PowerShell: Launch the PowerShell terminal with “Run as administrator” (administrator privileges).
  2. Execute the Command: Run the following script to query the registry and retrieve the IIS version.
Get-ItemProperty -Path "HKLM:\Software\Microsoft\inetstp" | Select-Object -ExpandProperty MajorVersion

In the above PowerShell script, the Get-ItemProperty cmdlet fetches the values of `MajorVersion` property from the registry key corresponding to the IIS server.

The output of the above PowerShell script retrieves the IIS version as 10.0

PS C:\> Get-ItemProperty -Path "HKLM:\Software\Microsoft\inetstp" | Select-Object -ExpandProperty MajorVersion          

10
PS C:\>                                                                                                                         

Cool Tip: How to register Dll in GAC using PowerShell!

Conclusion

I hope the above article on how to retrieve the version of Internet Information Services (IIS) using PowerShell is helpful to you.

You can find more topics about Active Directory tools and PowerShell basics on the ActiveDirectoryTools home page.