Solved

VBScript to return WMI value on SMS Server

Posted on 2006-11-13
4
724 Views
Last Modified: 2012-06-27
I've been using WBEMTEST to find the values under SMS_CONFIGURATIONITEM

Select * from SMS_CONFIGURATIONITEM

This then shows a list of items like this:

SMS_ConfigurationItem.CI_ID=1
SMS_ConfigurationItem.CI_ID=2
SMS_ConfigurationItem.CI_ID=3
SMS_ConfigurationItem.CI_ID=4

I want to do this via VBScript, showing the data contained within each "SMS_ConfigurationItem.CI_ID=#"

Can you help?

Thank you!

JohnD
0
Comment
Question by:johndarby
  • 3
4 Comments
 
LVL 1

Author Comment

by:johndarby
ID: 17934870
I tried this, but it failed, saying "object doesn't support this property or method" regarding objItem.Name

Here is what I have thus far...


strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\sms\site_b02")

Set colItems = objWMIService.ExecQuery("Select * from SMS_ConfigurationItem")

For Each objItem In colItems
    Wscript.Echo "Name: " & objItem.Name
Next
0
 
LVL 12

Accepted Solution

by:
jkaios earned 500 total points
ID: 17935225
Is there any namespace or WMI class called SMS_CONFIGURATIONITEM ??

As far as I know, there is an SMS_SCI_Configuration class, is that what you're after?

Or there is another one: SMS_SIIB_Configuration.
0
 
LVL 1

Author Comment

by:johndarby
ID: 17940140
This is SMS 2007 and the featureset is DCM (desired configuration management). The SMS_CONFIGURATIONITEM is provided for WMI via SMS server and is actually the data that resides in the SMS DB "dbo.CI_LocalizedCategoryInstances" Table.

This question is the WMI equivalent of the SQL question you answered for me yesterday.
0
 
LVL 1

Author Comment

by:johndarby
ID: 17940170
Your answer there:

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_22059383.html

...is the one I was looking for here.

Thanks!
JohnD
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now