Right Click Tools - Web Reports
Main Menu
>
Tools
>
Right Click Tools
Web Reports
Right click on a computer or a collection and run the reports.
Download
Code
--------- reports.vbs ------------ '' report.vbs
'' Report.vbs sms-serve1 170 MachineName ##Sub:name## URL = "http://#0#/SMSReporting_SYS/Report.asp?ReportID=#1#" URL2= "http://#0#/SMSReporting_SYS/Reports.asp?ReportID=#1#" Set objArgs = WScript.Arguments ' pull from external parameters getnext=-3 for Each item in objArgs if getnext=-3 then URL=Replace(URL,"#0#", item) URL2=Replace(URL2,"#0#", item) end if if getnext=-2 then URL=Replace(URL,"#1#", item) URL2=Replace(URL2,"#1#", item) getnext=-1 end if if getnext=0 then URL = URL + "&" + item +"=" End if if getnext=1 then URL = URL + item getnext=-1 End if getnext=getnext+1 Next Set Shell = CreateObject("Wscript.Shell") 'check to see if any parameters were passed if InStr(URL,"&")>0 then 'if pass a parameter then use it shell.Run(URL) wscript.echo url else 'else run the report request page shell.Run(URL2) end if ------------------------------------------------------------- ---------------Reports.xml for 7ba8bf44-2344-4035-bdb4-16630291dcf6 --------------------
C:\Program Files\sccmtools\reports\reports.vbs
sccmserver 170 MachineName ##SUB:Name##
C:\Program Files\sccmtools\reports\reports.vbs
sccmserver 126 ComputerName ##SUB:Name##
-----------------------------------------------------------------------------
Documentation
You will need create the necessary folders The folders under actions contains the GUIDs and xml files necessary to run reports per a single computer 7ba8bf44-2344-4035-bdb4-16630291dcf6 as well as those for collections fa922e1a-6add-477f-b70e-9a164f3b11a2 and dbb315c3-1d8b-4e6a-a7b1-db8246890f59. Move the files and modify as necessary. For the file that will launch the report, reports.vbs, you will need to move it from the "Sccm tools" folder to where ever you have your files. The program can run any of the reports if you pass the correct parameters report.vbs
Report.vbs sms-serve1 170 MachineName ##Sub:name## Currently this only allows for you to run Collection based reports or Individual Computer Reports. To expand simply add it to the correct guid and pass the correct values and you can use to run any report. The 1.xml and zz.xml are seperators. Since the xml files are run in alphabetical order this will create a seperator line above and below the line Note that I have modifed the paramters for a updates report. I found that if I remove the updateID and product that it would show all the updates for a specific machine so it doesn't represent the report 100%. ##SUB:NetBIOSName## Computer Name ##SUB:ResourceID## Resource ID number ##SUB:Name## Computer Name ##SUB:CollectionID## Collection ID ##SUB:ADVERTISEMENTID## Advertisment ID Created by Matthew Hudson