VBS Script To Create A Configuration Manager Web Report Data Dictionary


This VBS Script will create a Configuration Manager Web Reports data dictionary for your reference as an Excel spreadsheet.


VBS Script:


strComputer = InputBox ("Enter Site Server Name")

strSiteCode = InputBox ("Enter Site Code")


Set objExcel = CreateObject("Excel.Application")

objExcel.Visible = True


intRow = 2


objExcel.Cells(1, 1).Value = "Report ID"

objExcel.Cells(1, 2).Value = "Name"

objExcel.Cells(1, 3).Value = "Category"

objExcel.Cells(1, 4).Value = "Comment"

objExcel.Cells(1, 5).Value = "Report GUID"

objExcel.Cells(1, 6).Value = "Drill Through Columns"

objExcel.Cells(1, 7).Value = "Drill Through Report ID"

objExcel.Cells(1, 8).Value = "Drill Through Report Path"

objExcel.Cells(1, 9).Value = "Drill Through URL"

objExcel.Cells(1, 10).Value = "Graph Caption"

objExcel.Cells(1, 11).Value = "Graph Type"

objExcel.Cells(1, 12).Value = "Graph X Column"

objExcel.Cells(1, 13).Value = "Graph Y Column"

objExcel.Cells(1, 14).Value = "Machine Detail"

objExcel.Cells(1, 15).Value = "Machine Source"

objExcel.Cells(1, 16).Value = "Number Of Prompts"

objExcel.Cells(1, 17).Value = "Refresh Interval"

objExcel.Cells(1, 18).Value = "Report Parameters"

objExcel.Cells(1, 19).Value = "Security Key"

objExcel.Cells(1, 20).Value = "Status Message Detail Source"

objExcel.Cells(1, 21).Value = "Unicode Data"

objExcel.Cells(1, 22).Value = "X Column Label"

objExcel.Cells(1, 23).Value = "Y Columnb Label"


Set objWMIService = GetObject("winmgmts://" & strComputer & "\root\sms\site_" & strSiteCode)

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

For Each objItem in colItems


objExcel.Cells(intRow, 1).Value = objItem.ReportID

objExcel.Cells(intRow, 2).Value = objItem.Name

objExcel.Cells(intRow, 3).Value = objItem.Category

objExcel.Cells(intRow, 4).Value = objItem.Comment

objExcel.Cells(intRow, 5).Value = objItem.ReportGUID

objExcel.Cells(intRow, 6).Value = objItem.DrillThroughColumns

objExcel.Cells(intRow, 7).Value = objItem.DrillThroughReportID

objExcel.Cells(intRow, 8).Value = objItem.DrillThroughReportPath

objExcel.Cells(intRow, 9).Value = objItem.DrillThroughURL

objExcel.Cells(intRow, 10).Value = objItem.GraphCaption

objExcel.Cells(intRow, 11).Value = objItem.GraphType

objExcel.Cells(intRow, 12).Value = objItem.GraphXCol

objExcel.Cells(intRow, 13).Value = objItem.GraphYCol

objExcel.Cells(intRow, 14).Value = objItem.MachineDetail

objExcel.Cells(intRow, 15).Value = objItem.MachineSource

objExcel.Cells(intRow, 16).Value = objItem.NumPrompts

objExcel.Cells(intRow, 17).Value = objItem.RefreshInterval

objExcel.Cells(intRow, 18).Value = objItem.ReportParams

objExcel.Cells(intRow, 19).Value = objItem.SecurityKey

objExcel.Cells(intRow, 20).Value = objItem.StatusMessageDetailSource

objExcel.Cells(intRow, 21).Value = objItem.UnicodeData

objExcel.Cells(intRow, 22).Value = objItem.XColLabel

objExcel.Cells(intRow, 23).Value = objItem.YColLabel

intRow = intRow + 1




objExcel.Selection.Interior.ColorIndex = 19

objExcel.Selection.Font.ColorIndex = 11

objExcel.Selection.Font.Bold = True



Set objSheet = objExcel.ActiveWorkbook.Worksheets(1)

Set objRange = objExcel.Range("A1")

objRange.Sort objRange,1,,,,,,1


MsgBox "Done"



Published Friday, October 08, 2010 10:08 AM by dhite
Filed under:


# re: VBS Script To Create A Configuration Manager Web Report Data Dictionary

Thanks for all the emails on this post and just to clarify for everyone I wrote the script to retrieve all of the class properties not just the ones I use or have used. It was a matter of making the script inclusive rather that exclusive so just comment out all the class properties that you do not want retrieved. I am sorry that I didn’t state this in the initial post.

Tuesday, October 12, 2010 10:39 AM by dhite