WMI Script to find resource ID
- From: "Ann Thomas" <anne_27@xxxxxxxxxxx>
- Date: 2 Jan 2007 07:46:31 -0800
Hello
I am attempting a script that will read GUIDs from a log file and
connect to the SMS namespace and write the ResourceID based on the
client GUID to a text file
Here is what the script looks like - logstr1.txt is the file that has
the GUID -one on each line. I can't get this to work .. would
appreciate any ideas or suggestions.
Here is what logstr1.txt look like
79692D09-64F7-47E6-A9E5-7A9DF59E747B
1F692082-765D-4F7E-A115-0604D12FE498
6C724717-2754-48F9-9F1B-E42DAA44C418
On Error Resume Next
Set loc = CreateObject("WbemScripting.SWbemLocator")
Set objWbemServices = loc.ConnectServer( , "root\SMS\site_CEN")
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("D:\temp\logstr1.txt")
Do Until objFile.AtEndOfStream
GUIDID= "GUID:" + objFile.ReadLine
ResourceNo=objSWbemServices.ExecQuery ("SELECT ResourceID FROM
SMS_R_System WHERE SMSUniqueIdentifier="'" & GUIDID & "'" ")
Wscript.Echo ResourceNo
Loop
.
- Follow-Ups:
- Re: WMI Script to find resource ID
- From: Rune Norberg
- Re: WMI Script to find resource ID
- Next by Date: SMS SDK - Reports.create
- Next by thread: Re: WMI Script to find resource ID
- Index(es):
Relevant Pages
|