Solved

VBScript to return WMI value on SMS Server

Posted on 2006-11-13
4
732 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

717 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