Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding Version of IIS using powershell

Tags:

I wish to find the version of IIS using a powershell (or WMI) query.

The following is the query which I have used.

Get-WmiObject -namespace "root\microsoftiisv2" -query "select MajorIIsVersionNumber from IISWebInfo" 

I tested this query using powershell console in a 'Windows 8' PC with 'IIS 8'. But the result is 7 , where the expected version Number is 8.

Can someone help me to solve this issue?.

like image 220
Sebastian Xavier Avatar asked May 28 '13 05:05

Sebastian Xavier


People also ask

What version of IIS is on Windows Server 2022?

IIS 8.5 is included in Windows Server 2012 R2 and Windows 8.1.

How do I determine IIS version?

Type inetmgr into the textbox and press Enter on your keyboard (you can also type %SystemRoot%\system32\inetsrv\InetMgr.exe instead and press Enter). The Internet Information Services (IIS) Manager window will appear. Go to Help -> About Internet Information Services to find IIS version.

How do I tell if IIS is installed on PowerShell?

Using Run Command Select windows +R key and type inetmgr and press OK. It will open the IIS manager window . In the same way go to Help ->About Internet Information Services and you will get the version installed on your computer. Alternatively select windows +R and type %SystemRoot%\system32\inetsrv\InetMgr.exe.


1 Answers

You can try:

get-itemproperty HKLM:\SOFTWARE\Microsoft\InetStp\  | select setupstring,versionstring  
like image 112
CB. Avatar answered Sep 20 '22 12:09

CB.