Solved

VBScript to return WMI value on SMS Server

Posted on 2006-11-13
4
728 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

820 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