How to check the version number of Internet Explorer COM object

In PowerShell I have:

$ie = New-Object -COM InternetExplorer.Application

How to get the version number of $ie? I want to verify that we are using an instance of IE11 or later, or prompt the user to upgrade their Internet Explorer.

Thanks!

Answer: Building on the accepted answer this is what I used:

$ieVersion = New-Object -TypeName System.Version -ArgumentList (
    Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Internet Explorer').Version
$ieVersion = New-Object -TypeName System.Version -ArgumentList (
    # switch major and minor
    $ieVersion.Minor, $ieVersion.Major, $ieVersion.Build, $ieVersion.Revision)
if ($ieVersion.Major -lt 11)
{
    Write-Error "Internet Explorer 11 or later required. Current IE version is $ieVersion"
    exit
}

Answers


Without instantiating an InternetExplore.Application object one could use PowerShell to retrieve the version of IE from the registry. All versions of IE store their version in the same place. This should work:

 (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Internet Explorer').Version

In order to make sense of the Internet Explorer version numbers Microsoft provides a table. In particular IE11 is:

Internet Explorer 11 will have a version number that starts with 11 (for example, 11.0.9600). The version number will change based on the updates that have been installed for Internet Explorer. To see the version number and the most recent update installed, go to the Help menu and select About Internet Explorer.

Special Note: For IE 10+:

The version number returned by Version will appear as <version minor>.<version major>... . The true version that gets displayed is now stored in SvcVersion. One could create a Powershell Script that queries SvcVersion (instead of Version) and if it returns non blank use it. Otherwise one should query Version as above.


Need Your Help

CSS Links wont change colour

html css colors hyperlink

I am trying to change color of a link but I am having no luck.

How to config nginx to proxy to rails app? so that i dont have to say domain.com:port

ruby-on-rails nginx deployment proxy unicorn

Update: Currently i visit my app at domain.com:3000, but i would like to visit domain.com to see my app

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.