Skip to content

Instantly share code, notes, and snippets.

@ScriptingPro
Created October 27, 2016 20:19
Show Gist options
  • Select an option

  • Save ScriptingPro/f1ad3735401951e9c33139b1579532fb to your computer and use it in GitHub Desktop.

Select an option

Save ScriptingPro/f1ad3735401951e9c33139b1579532fb to your computer and use it in GitHub Desktop.
Check IIS Version with Powershell
<#
one-liner to quickly determine IIS version information from a Powershell prompt
#>
Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\InetStp' | select InstallPath, VersionString, @{n="ProductVersion";e={(Get-ItemProperty ($_.InstallPath + "\w3wp.exe")).VersionInfo.ProductVersion}}
@StefanJanssen95
Copy link
Copy Markdown

Thanks, I've found a lot of scripts that just returned the version as 10.0 while I needed to find the ProductVersion ex: 10.0.19041.1 which is returned from this script.

@susindran1308
Copy link
Copy Markdown

Anyone know how to get this via WMI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment