What would the preferred way of programmatically determining which the currently installed version of Microsoft Internet Information Services (IIS) is?
I know that i
The below command helped me find the IIS version correctly on IIS 8.5 (Windows 2012 R2) and 7.5 Windows 7 SP1.
[System.Diagnostics.FileVersionInfo]::GetVersionInfo("$env:SystemRoot\system32\inetsrv\InetMgr.exe").ProductVersion
Reference:
https://forums.iis.net/p/1171695/1984536.aspx : Answer from f00_beard