Solved

Audit all domain computers for browser version

Posted on 2011-09-27
6
1,738 Views
Last Modified: 2012-06-22
Hi,

I need to check all of the computers in our domain and create a report that lists each workstation and the version of internet explorer they have installed on them (or if they have a different web browser installed).  This should be relatively straightforward but I have been searching the internet for days and I can't find any way to achieve this.

NB: All workstations running Windows XP - domain is W2K3 with approx. 200 computers.

Please help - this is urgent!

Richard Powell
0
Comment
Question by:richardstuartpowell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 65

Expert Comment

by:RobSampson
ID: 36708435
Hi Richard,

As far as getting the version of IE goes, this should do it.  As for determining other browsers, that's more difficult because there's so many.....

Regards,

Rob.
Set objFSO = CreateObject("Scripting.FileSystemObject")
Const intForReading = 1
strComputersFile = "computers.txt"
strOutputFile = "FileVersionLog.txt"
strFileToFind = "C:\Program Files\Internet Explorer\iexplore.exe"
Set objComputers = objFSO.OpenTextFile(strComputersFile, intForReading, False)
Set objLogFile = objFSO.CreateTextFile(strOutputFile, True)
objLogFile.WriteLine "Script run at " & Now & VbCrLf
While Not objComputers.AtEndOfStream
	strComputer = objComputers.ReadLine
	strVersion = ""
	If Ping(strComputer) = True Then
		strUNCFile = "\\" & strComputer & "\" & Replace(strFileToFind, ":", "$")
		If objFSO.FileExists(strUNCFile) = True Then
			strVersion = objFSO.GetFileVersion(strUNCFile)
			objLogFile.WriteLine strComputer & vbTab & strVersion
		Else
			objLogFile.WriteLine strComputer & vbTab & "File not found"
		End If
	Else
		objLogFile.WriteLine strComputer & vbTab & "Unreachable"
	End If
Wend
objComputers.Close
MsgBox "Done"
 
Function Ping(strComputer)
	Dim objShell, boolCode
	Set objShell = CreateObject("WScript.Shell")
	boolCode = objShell.Run("Ping -n 1 -w 300 " & strComputer, 0, True)
	If boolCode = 0 Then
		Ping = True
	Else
		Ping = False
	End If
End Function

Open in new window

0
 
LVL 8

Expert Comment

by:jawa29
ID: 36708444
Hi Richard

This is a question I answered before and should help to start you off.
http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_26924043.html

Jawa29
0
 
LVL 2

Author Comment

by:richardstuartpowell
ID: 36708542
Hi jawa29

I've looked at your script but I'm not 100% sure how to use it.

Can you send me the finished script to scan all of the computers in a domain called iems.toytown.com please?

When I run the script I just get the black DOS window with no messages whatsoever - it just sits there and it's not creating the text file (Set oTextFile = oFSO.OpenTextFile("C:\IE_Version_Results.csv", ForWriting, True) either - do I just need to wait a while?

Rich.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 8

Accepted Solution

by:
jawa29 earned 500 total points
ID: 36708576
Hi Rich

The script automatically gets the domain name from the PC it is running on.

The script could take awhile to finish depending on the number of PC's in the domain. the text file isn't created until the entire script is finished. Check Task Manager to see if you have a wscript.exe or cscript.exe still running.

Jawa29
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 36708595
My script requires that you have all of your domain computers (or ones you want to scan) in a file called computers.txt.  If you don't have that already, use this code to dump all computers to a file.

Regards,

Rob.
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Set objRootDSE = GetObject("LDAP://RootDSE")
'strRootDSE = objRootDSE.Get("configurationNamingContext")
Set objNetwork = CreateObject("WScript.Network")
Set objComputers = GetObject("WinNT://" & objNetwork.UserDomain)
objComputers.Filter = Array("Computer")
Set objOutputFile = objFSO.CreateTextFile("computers.txt", True)
For Each objComputer In objComputers
	objOutputFile.WriteLine objComputer.Name
Next
objOutputFile.Close
Set objOutputFile = Nothing
MsgBox "Done"

Open in new window

0
 
LVL 2

Author Closing Comment

by:richardstuartpowell
ID: 36708835
Superb response + excellent solution / script !

Thanks a million :-)

Rich.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article outlines the process to identify and resolve account lockout in an Active Directory environment.
Always backup Domain, SYSVOL etc.using processes according to Microsoft Best Practices. This is meant as a disaster recovery process for small environments that did not implement backup processes and did not run a secondary domain controller that ne…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question