FYI: "Wscript.echo" is a command to echo (or display) the information that comes after it.
I think you more want to do an IF statement. If objItem.Name = "Tivoli Storage Manager" then ' echo the contents to the screen end if BTW, Sorry about Tivoli, that product is a major PIA to administer. On Tue, Jul 8, 2008 at 2:33 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > That's closer. Trying to query to see if TSM is installed. Can I just add > > Wscript.Echo "GroupName: " Tivoli Storage Manager > > To see if TSM is installed? > > > Original Message: > ----------------- > From: Michael B. Smith [EMAIL PROTECTED] > Date: Tue, 8 Jul 2008 17:18:19 -0400 > To: [email protected] > Subject: RE: WMI Query > > > Eh, you probably mean something like this: > > On Error Resume Next > strComputers = Array ("Server1", "Server2", "Server3") > For i = LBound (strComputers) To UBound(strComputers) > strcomputer = strcomputers[i] > Set objWMIService = GetObject("winmgmts:\\" & strComputer & > "\root\cimv2") > Set colItems = objWMIService.ExecQuery("Select * from > Win32_ProgramGroup",,48) > For Each objItem in colItems > Wscript.Echo "Caption: " & objItem.Caption > Wscript.Echo "Description: " & objItem.Description > Wscript.Echo "GroupName: " & objItem.GroupName > Wscript.Echo "Name: TSM & objItem.Name > Wscript.Echo "SettingID: " & objItem.SettingID > Wscript.Echo "UserName: " & objItem.UserName > Next > set colItems = Nothing > set objWMIService = Nothing > Next > > Regards, > > Michael B. Smith > MCITP:EM/MCSE/Exchange MVP > http://TheEssentialExchange.com > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 08, 2008 5:12 PM > To: NT System Admin Issues > Subject: WMI Query > > Looking for help with WMI query for an application (TSM). > > On Error Resume Next > strComputer = "Server1 > Server2 > Server3" > Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") > Set colItems = objWMIService.ExecQuery("Select * from > Win32_ProgramGroup",,48) > For Each objItem in colItems > Wscript.Echo "Caption: " & objItem.Caption > Wscript.Echo "Description: " & objItem.Description > Wscript.Echo "GroupName: " & objItem.GroupName > Wscript.Echo "Name: TSM & objItem.Name > Wscript.Echo "SettingID: " & objItem.SettingID > Wscript.Echo "UserName: " & objItem.UserName > Next > > Can anyone help? > > Thanks, > > Mike > > -------------------------------------------------------------------- > mail2web LIVE - Free email based on MicrosoftR Exchange technology - > http://link.mail2web.com/LIVE > > > > ~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~ > ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~ > > > ~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~ > ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~ > > > -------------------------------------------------------------------- > mail2web - Check your email from the web at > http://link.mail2web.com/mail2web > > > > ~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~ > ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~ > ~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~ ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~
