Hi Team,
I am looking script which can find internet explorer version . I need to run this script among 1000 servers.
can anyone help me on this .....?
Technology Tips and News
Hi Team,
I am looking script which can find internet explorer version . I need to run this script among 1000 servers.
can anyone help me on this .....?
Hello Triyambak,
You could try this , hope WinRM and PS remoting are all good on those 1000+ servers
Function Get-IEVersion { Param([string]$computer = $env:COMPUTERNAME) Write-Output $computer Get-ItemProperty -path 'HKLM:\SOFTWARE\Microsoft\Internet Explorer' -ErrorAction SilentlyContinue | select-object Version,svcUpdateVersion | Select-Object -Property "Version",@{Name="Updated to Version";Expression="svcUpdateVersion"} }
Then,
Get-Content C:\hosts.txt | foreach {Get-IEVersion -computer $_}
Where hosts.txt has the server details..
OR
get-content c:\hosts | foreach {[system.diagnostics.fileversioninfo]::GetVersionInfo("\\$_\C`$\program files\internet explorer\iexplore.exe") }
Regards,
V.
Venu - that won't work.It only queries the local machine.
Look in repository for a script that uses remote registry calls or use the WMI registry provider to remote the query.
Try this:
#http://support.microsoft.com/kb/900935 Function Get-RemoteRegistryValue{ Param( $computername=$env:computername, $key ='SOFTWARE\Microsoft\Windows NT\CurrentVersion', $valuename='CurrentBuild' ) $reg=[Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $computername) $regKey=$reg.OpenSubKey($key) $regKey.GetValue($valuename) }
Get-RemoteRegistryValue -computer somepc -key 'SOFTWARE\Microsoft\Internet Explorer' -ValueName Version