'This script, gather from a list of servers.txt all hotfix installed and creates a txt file for each server 'Authour: Felipe Ferreira 'Date: 06/04/2007 'version: 3.0 Dim IfSO, oFSO, Ifile, ofile, Inputfile, outputfile Set iFSO = CreateObject("Scripting.FilesyStemObject") Set oFSO = CreateObject("Scripting.FilesyStemObject") Inputfile = "servers.txt" Const ForAppending = 8 Set ifile = iFSO.OpenTextFile(Inputfile) 'Start to read the inputfile and goes thru each line untill list is done Do until ifile.AtEndOfLine strComputer = ifile.ReadLine 'Outputfile = StrCoumputer & "_hotfix.txt" 'GET NAME OF SERVER FROM FILE Set ofile = oFso.CreateTextFile(strComputer & "_" & year(DATE) & "_" & Month(DATE) & "_" & Day(DATE) & "_hotfixes.txt",true) wscript.echo "Getting HotFixes from: " & strComputer Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colQuickFixes = objWMIService.ExecQuery _ ("Select * from Win32_QuickFixEngineering where HotFixID <> 'File 1'") 'Gets hotfixid Also Cleans the dirty data For Each objQuickFix in colQuickFixes Wscript.Echo objQuickFix.HotFixID ofile.writeline objQuickFix.HotFixID Next Loop 'goes thru servers.txt