I guess everyone uses the report showing how fare along a Task Sequence actually is, or if one of the steps has failed. But sometimes this report disappears after the TS finishes, so wouldn’t it be nice to always have it available afterword to see it one or more steps have failed, or to evaluate if an option acts like expected..

Well with a little help from one of my collages (Claus Codam) I created this routine to have that available, in by LOGS folder, and here is how.

1. Create a new user to use for reporting (in this example the account will be CM-Report), or choose an existing one.

2. Grant that user reporting rights and modify rights to the LOG share.

To Grant reporting rights, first log on to the site server holding the Reporting Point Role. Go to “Local Users and Groups” – “Groups”, open “SMS Reporting Users” and add the user to the Group.

clip_image001

From within the Config.Mgr console, navigate to “Security Rights” – “Rights” and grant the new (or existing) user Read permissions on the Report Class.

clip_image003

Create a folder to hold the logs, and grant the user modify permissions to that folder.

3. Add the actual script that will create the report , to a package, to make it available during deployment.

4. Modify the script to support your own environment, by changing the ReportingPoint and ReportID variables.

The ReportID should be 143 as it is in the script, but in cases where config.mgr has been upgraded from previous versions, it might have changed. To find the correct ID number, open “Reporting” – “Reports” in Config.Mgr and look for “History – Specific task sequence advertisements run on a specific computer”

clip_image004

The ReportingPoint value can be found by opening the ConfigMgr reporting point Role

clip_image005

Once the changes have been mad, remember to update your DP.

5. Add steps to your TS to run the script.

Basically all you need to do is add a ”Run Command Line” step, as the last step in your TS, and run it as the report user created earlier. The syntax for running the script is as follows:

cscript.exe TSReport.vbs %SLShare% %_SMSTSAdvertID% %_SMSTSMachineName%

SLShare must of cause be defined prior to running this step, or the share path can be typed in instead, AdvertID and MachineName are picked up automatically by the TS, although you might want to change _SMSTSMachineName to OSDComputerName, depending on how you do your installation.

The reason these variables are not picked up by the script is because they are not available when running the script under a different account.

In the screenshot beneath you will notice that I put in a step to have the TS wait for two minutes just before running the reporting step. This is because it takes a little while before the info on each steps are actually reported back to the DB.

clip_image006

That’s it. You will now get a report like this in your LOGS folder, with the same layout as the normal report.

clip_image007

Download “Getting a Hardcopy of the TS progress report” TSReport.zip – Downloaded 422 times – 1 KB