'Get target host and credentials Wscript.StdOut.Write "Please enter target host:" strComputer = Wscript.StdIn.ReadLine strDomain = strComputer Wscript.StdOut.Write "Please enter your user name:" strUser = Wscript.StdIn.ReadLine Set objPassword = CreateObject("ScriptPW.Password") Wscript.StdOut.Write "Please enter your password:" strPassword = objPassword.GetPassword() 'Create output file Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.CreateTextFile("installed_software_" + strComputer + ".tsv", True) 'Connect to remote system Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator") Set objSWbemServices = objSWbemLocator.ConnectServer _ (strComputer, "root\cimv2", strUser, strPassword, "MS_409", "ntlmdomain:" + strDomain) 'Pull data from system Set colItems = objSWbemServices.ExecQuery _ ("SELECT * FROM Win32_Product") 'Write categories to file objTextFile.WriteLine "Caption" & vbtab & _ "Description" & vbtab & "Identifying Number" & vbtab & _ "Install Date" & vbtab & "Install Location" & vbtab & _ "Install State" & vbtab & "Name" & vbtab & _ "Package Cache" & vbtab & "SKU Number" & vbtab & "Vendor" & vbtab _ & "Version" 'Write values to file For Each objSoftware in colSoftware objTextFile.WriteLine objSoftware.Caption & vbtab & _ objSoftware.Description & vbtab & _ objSoftware.IdentifyingNumber & vbtab & _ objSoftware.InstallDate & vbtab & _ objSoftware.InstallLocation & vbtab & _ objSoftware.InstallState & vbtab & _ objSoftware.Name & vbtab & _ objSoftware.PackageCache & vbtab & _ objSoftware.SKUNumber & vbtab & _ objSoftware.Vendor & vbtab & _ objSoftware.Version Next objTextFile.Close