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?.
IIS 8.5 is included in Windows Server 2012 R2 and Windows 8.1.
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.
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.
You can try:
get-itemproperty HKLM:\SOFTWARE\Microsoft\InetStp\ | select setupstring,versionstring
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With