FInd IE Version on Remote Computers using PowerShell


Function IEVersion {
$Prop = [ordered]@{}
$ComputerName = Cat C:\computers.txt
$ErrorActionPreference = “Stop”
foreach ($computer in $ComputerName)
{

Try {
$Syntax = GWMI win32_operatingsystem -cn $computer
$Prop.Computername = $Syntax.CSName
$Prop.OperatingSystem = $Syntax.Caption
$Prop.ServicePack = $Syntax.CSDVersion
$Reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey(‘LocalMachine’, $computer)
$RegKey= $Reg.OpenSubKey(“SOFTWARE\\Microsoft\\Internet Explorer”)
$Prop.IEVersion = $Regkey.GetValue(“svcVersion”)

New-Object PSObject -property $Prop
}

Catch
{

Add-Content “$computer is not reachable” -path $env:USERPROFILE\Desktop\UnreachableHosts.txt
}
}
}
#HTML Color Code
#http://technet.microsoft.com/en-us/librProp/ff730936.aspx
$a = “<!–mce:0–>”
IEVersion | ConvertTo-HTML -head $a -body ”

IE Version

” |
Out-File $env:USERPROFILE\Desktop\DomainController.htm #HTML Output
Invoke-Item $env:USERPROFILE\Desktop\DomainController.htm

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: