The SMS 2003 web reports have some cool built in stuff around advertisements, one in particular is viewing advertisements for a specific system. A way that you can take advantage of this is to include a link in your customer communication so that they can view all active advertisements hitting their system. But how do you do this without giving them instructions for navigating throughout the web reports? Wouldn't a link be nice?
The actual link is going to
http://REPORTINGPOINT/smsreporting_SITECODE/Report.asp?ReportID=131&ComputerName=COMPUTERNAME (Note this is not a real link as everything in CAPS needs to be changed for your environment). The beginning of this link is easy enough to change as your SMS Reporting Point URL won't change that often, but now what you need is some custom scripting to grab the COMPUTERNAME dynamically when someone visits the webpage.
To do this first you will need to enable ReverseDNS Lookups on your web server. You can do this by running the following command as documented in KB245574
cscript adsutil.vbs set /w3svc/1/ROOT/EnableReverseDNS "TRUE"
Once this has been done, copy the text below into a file and call it adverts.asp:
<%
Dim strUser
strCompName = Request.ServerVariables("REMOTE_HOST")
strPullDNS = InStr(1,strCompName,".") -1
strCompName = Left(strCompName, strPullDNS)
Response.Redirect "
http://REPORTINGPOINT/smsreporting_SITECODE/Report.asp?ReportID=131&ComputerName=" & strCompName
%>
Edit this with notepad and change the REPORTINGPOINT and SITECODE values to accurately represent your site configuration. Then go to the <DRIVELETTER>:\Inetpub\wwwroot\Smsreporting_SITECODE directory on your reporting point and place the adverts.asp file in it. After this you can simply run the following from a web browser to automatically detect the system name and display all active advertisements going to it:
http://REPORTINGPOINT/smsreporting_SITECODE/adverts.asp
***Remember to back this up because whenever you run a site reset or upgrade (like SMS SP1) this could be overwritten or deleted!
Sorry things have been quiet here of late but I've been doing some traveling for work recently and there has been a lot going on away from the keyboard taking up my time as well but I hope to get back to giving more SMS-nugget related posts here. One thing that I've really been getting into recently is Software Metering and have found that most of my customer's mission critical applications don't have information such as the language or version in the file header which I'm looking for. Its way up in the list (above 'Afrikaans') but you can specify -Any- as the language if you have a rule in place but aren't seeing the results you thought you might. Even if you are using a wildcard for the file version many times this adjustment is needed for the Language as well.