<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Windows Consumer Support Automation Team Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/justtroubleshootme/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/justtroubleshootme/feed.xml</link>
    <description>Our team develops automated troubleshooters to address top issues in Windows, Office and Microsoft Apps.  This blog showcases what we do and how we do it!</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:06:52 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>New Support Diagnostics Available</title>
      <link>https://docs.microsoft.com/archive/blogs/justtroubleshootme/new-support-diagnostics-available</link>
      <pubDate>Mon, 22 Apr 2013 11:49:19 GMT</pubDate>
      <dc:creator><![CDATA[Ivona Kaczynski]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/justtroubleshootme/2013/04/22/new-support-diagnostics-available/</guid>
      <description><![CDATA[Hailing support engineers and IT pros.&nbsp; The Consumer Support Automation Team released or...]]></description>
      <content:encoded><![CDATA[<p>Hailing support engineers and IT pros.&nbsp; The Consumer Support Automation Team released or updated the following troubleshooters in March, check them out!</p>
<p><strong><a href="http://windows.microsoft.com/en-us/windows/no-sound-help#no-sound=windows-7&amp;v1h=win8tab1&amp;v2h=win7tab1&amp;v3h=winvistatab1&amp;v4h=winxptab1">Audio Playback</a></strong> <br />The Audio Playback troubleshooter has been updated to help users who don&rsquo;t get sound in Windows Store Apps or on some web sites.&nbsp; If you can&rsquo;t play sound or music at all, this troubleshooter is for you.</p>
<p><strong><a href="http://windows.microsoft.com/en-US/windows-8/what-troubleshoot-problems-app">Windows Store Apps</a></strong> <br />This troubleshooter has also been updated to find and fix problems with sound in Windows Store Apps.&nbsp; Run this troubleshooter when you can play sound or music in desktop applications, but not in apps you&rsquo;ve downloaded from the Windows Store, or if you experience other problems running Apps from the store.</p>
<p><strong><a href="http://support.microsoft.com/kb/2825739">Microsoft Word (KB2825739)</a></strong> <br />Some users of the Turkish version of Office 2013 may see an error message every time they start Word.&nbsp; This troubleshooter fixes the problem and the error message will no longer be shown.&nbsp; It only applies to the Turkish version of Office 2013.&nbsp; Check out <a href="http://support.microsoft.com/kb/2825739">KB2825739</a> for more information.&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>How To Automate Troubleshooting and Resolving Registry Key Issues</title>
      <link>https://docs.microsoft.com/archive/blogs/justtroubleshootme/how-to-automate-troubleshooting-and-resolving-registry-key-issues</link>
      <pubDate>Mon, 22 Oct 2012 12:29:00 GMT</pubDate>
      <dc:creator><![CDATA[Ivona Kaczynski]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/justtroubleshootme/2012/10/22/how-to-automate-troubleshooting-and-resolving-registry-key-issues/</guid>
      <description><![CDATA[This post will show you how to use Windows Troubleshooting Pack Designer to troubleshoot registry...]]></description>
      <content:encoded><![CDATA[<p>This post will show you how to use Windows Troubleshooting Pack Designer to troubleshoot registry key issues.&nbsp; This can come in handy if you ever find yourself needing a fast way to repeatedly modify a registry based setting on a PC.&nbsp; Instead of mucking around in regedit, all you need to do is run the troubleshooter.</p>
<p>These instructions will give you a troubleshooting pack that works on Windows 7 operating systems.&nbsp; However, I will update this post after Windows 8 release to show you how you can get the same tools to work on Windows 8.&nbsp; Once you are able to do this, there are multitudes of regkeys and values you can modify.&nbsp; Just make sure you don&rsquo;t go running to the dark side with this one.&nbsp; Heed this warning:</p>
<p style="padding-left: 30px;"><i>The registry contains really important operation and configuration information on your PC.&nbsp; If you edit it incorrectly, you could end up with some serious issues.&nbsp; Please, before you do anything described below, </i><a href="http://windows.microsoft.com/en-US/windows7/Back-up-the-registry"><i><span style="color: #00749e;" color="#00749e">back up your registry</span></i></a><i>.&nbsp; If you want to know more about working with the registry, see </i><a href="http://support.microsoft.com/kb/310516"><i><span style="color: #00749e;" color="#00749e">KB 310516</span></i></a><i>.</i></p>
<p>I&rsquo;ve chosen a relatively harmless Windows 7 registry tweak for illustration purposes only.&nbsp; With a little imagination (or experience with repetitive registry modifications) you can come up with your own custom application of this tool.</p>
<p><b>Step 1 &ndash; Start TSPD: </b>Open Windows Troubleshooting Pack Designer.&nbsp; Installation steps are listed in <a href="http://blogs.technet.com/b/justtroubleshootme/archive/2012/07/10/installing-troubleshooting-pack-designer.aspx"><span style="color: #00749e;" color="#00749e">this blog post</span></a>.&nbsp; If you have not applied the TSPD fix yet, be sure to do that.</p>
<p><b>Step 2 - Create a project:</b> Select &ldquo;Project &gt; New&rdquo;.&nbsp; Name your project Enable Aero.&nbsp; A troubleshooting pack directory named Enable Aero is then created in your $User\Documents\troubleshooting packs folder.</p>
<p><b>Step 3 &ndash; Create the Title Screen:</b> Your Project Name field is given the default name &ldquo;Enable Aero&rdquo; &ndash; you can change it if you want, but for this example, leave it as is.&nbsp; The project name shows up as the title in the first screen of the troubleshooter.&nbsp; Enter the following under Project Description:&nbsp; &ldquo;Turn Aero on&rdquo;.&nbsp; You can leave the &ldquo;Privacy URL&rdquo; field blank unless you&rsquo;re interested in providing users with a privacy link.</p>
<p><b>Step 4 - Plan your workflow:</b> Troubleshooting packs work in three main functional steps, each &ldquo;compartmentalized&rdquo; into independent scipts that &ldquo;talk&rdquo; to each other via Windows Troubleshooting Platform.&nbsp; This is discussed in detail in the <a href="http://blogs.technet.com/b/justtroubleshootme/archive/2012/07/10/device-error-troubleshooting-sample.aspx"><span style="color: #00749e;" color="#00749e">Device error troubleshooting sample</span></a>.&nbsp; These steps are as follows: Detect, Resolve, and Verify.&nbsp; When you created your project in Troubleshooting Pack Designer, these scripts were added for you as part of the project.</p>
<p>You first need to define the state which &ldquo;triggers&rdquo; the necessary resolution steps to take place.&nbsp; You don&rsquo;t want a fix being applied if something&rsquo;s not broken, right?&nbsp; Once you&rsquo;ve understood your detection logic, define the resolution steps.&nbsp; Finally. you&rsquo;ll need logic to verify that resolver actually fixed the problem we were looking for. In many cases, you can simply recycle the detection script itself.&nbsp; Let&rsquo;s do this is pseudocode (pseudoscript?) first:</p>
<p style="padding-left: 30px;"><b><i>Detect:</i></b><i> Check the REG_DWORD-type &ldquo;Composition&rdquo; registry value in HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM.&nbsp; Is the data for this value set to &ldquo;0&rdquo; ?&nbsp; In this case &ldquo;1&rdquo; represents &ldquo;Aero on&rdquo; and &ldquo;0&rdquo; represents &ldquo;Aero off&rdquo;.&nbsp; If the &ldquo;Composition&rdquo; value data is not 1 (on) then our root cause detection is true and we can step into the resolving the problem.&nbsp; If the value is already 1, then we don&rsquo;t have the problem and root cause detection is false.</i></p>
<p style="padding-left: 30px;"><b><i>Resolve:</i></b><i> Set &ldquo;Composition&rdquo; data to &ldquo;1&rdquo;</i></p>
<p style="padding-left: 30px;"><b><i>Verify</i></b><i>: Rerun detection script and if the resolver succeeded, then root cause detection will return false instead of true.</i></p>
<p><b>Step 5 - Add a Root Cause:</b> In Project Explorer on the left, click &ldquo;Add New Root Cause&rdquo;.&nbsp; A &ldquo;root cause&rdquo; is essentially a test condition.&nbsp; As mentioned above, if we detect the root cause then we will apply the fix.&nbsp; Let&rsquo;s make the Root Cause ID &ldquo;IncorrectRegValueData&rdquo;.&nbsp; This ID is referenced by your scripts.&nbsp; The Root Cause Name should be &ldquo;Composition registry value data incorrect&rdquo;.&nbsp; Leave the Root Cause Description blank for now.</p>
<p><b>Step 6 &ndash; Define the Troubleshooter:</b>&nbsp; In Project Explorer, click &ldquo;Define Troubleshooter&rdquo;.&nbsp; You should not need to change the Troubleshooter properties presented &ndash; assuming you are an admin on the machine you&rsquo;re working on, you don&rsquo;t need the troubleshooter to run with elevated privileges.&nbsp; We will not be using interactions in this example.</p>
<p><b>Step 7 &ndash; Define the Resolver:</b>&nbsp; In Project Explorer, click &ldquo;Define Resolver&rdquo;.&nbsp; Our Resolver Name will be &ldquo;Update registry value data&rdquo;.&nbsp; You can leave the Resolver Description blank for now.&nbsp; Also, leave the Prompt, Elevation, Interaction and Parameter options as they are.</p>
<p><b>Step 8 - Define the Verifier:</b>&nbsp; In Project Explorer, click &ldquo;Define Verifier&rdquo;.&nbsp; Because it is possible for a verifier script to determine the root cause has been resolved and we can reuse the troubleshooting script, leave the Verifiable and Reuse Troubleshooter options as they are.</p>
<p><b>Step 9 &ndash; Edit Root Cause Scripts:</b>&nbsp; In Project Explorer, click &ldquo;Edit Root Cause Scripts&rdquo;.&nbsp;&nbsp; Let&rsquo;s start with the troubleshooter that contains the detection logic.&nbsp; Click on &ldquo;Edit Troubleshooter Script&rdquo; to open it in PowerShell.&nbsp; Notice that Troubleshooting Pack Designer named your script consistently with the RootCauseID you defined earlier (TS_IncorrectRegValueData.ps1).</p>
<p>You will see the following in your troubleshooting script:</p>
<p style="padding-left: 30px;"><span style="font-family: terminal,monaco;"># TroubleshooterScript - This script checks for the presence of a root cause</span><br /><span style="font-family: terminal,monaco;"># Key Cmdlets:</span><br /><span style="font-family: terminal,monaco;"># -- update-diagrootcause flags the status of a root cause and can be used to pass parameters</span><br /><span style="font-family: terminal,monaco;"># -- get-diaginput invokes an interactions and returns the response</span><br /><span style="font-family: terminal,monaco;"># -- write-diagprogress displays a progress string to the user</span><br /><br /><span style="font-family: terminal,monaco;">$RootCauseID = "IncorrectRegValueData"</span><br /><br /><span style="font-family: terminal,monaco;"># Your detection Logic Here</span><br /><br /><span style="font-family: terminal,monaco;">$RootCauseDetected = $true #Replace "$true" with the result of your detection logic</span><br /><br /><span style="font-family: terminal,monaco;">#The following line notifies Windows Troubleshooting Platform of the status of this root cause</span><br /><span style="font-family: terminal,monaco;">update-diagrootcause -id $RootCauseId -detected $RootCauseDetected</span></p>
<p>In place of &rdquo;<span style="font-family: terminal,monaco;"># Your detection Logic Here</span>&rdquo;, add the following PowerShell logic:</p>
<p style="padding-left: 30px;"><span style="font-family: terminal,monaco;">#Detection logic: Select registry path and find the data stored under the "Composition" registry value</span><br /><span style="font-family: terminal,monaco;">$regPath = Get-ItemProperty HKCU:\Software\Microsoft\Windows\DWM</span><br /><span style="font-family: terminal,monaco;">$regValueData = $regPath."Composition"</span><br /><br /><span style="font-family: terminal,monaco;">#Check if the registry data is not 1.&nbsp; If this is true, root cause has been detected</span></p>
<p style="padding-left: 30px;"><span style="font-family: terminal,monaco;">if</span><br /><span style="font-family: terminal,monaco;">($regValueData -ne </span><span style="font-family: terminal,monaco;">"1")<br /></span><span style="font-family: terminal,monaco;">{</span><br /><span style="font-family: terminal,monaco;">&nbsp;&nbsp;&nbsp; $RootCauseDetected = $true</span><br /><span style="font-family: terminal,monaco;">}</span></p>
<p style="padding-left: 30px;"><span style="font-family: terminal,monaco;">else</span><br /><span style="font-family: terminal,monaco;">{</span><br /><span style="font-family: terminal,monaco;">&nbsp;&nbsp;&nbsp; $RootCauseDetected = $false</span><br /><span style="font-family: terminal,monaco;">}&nbsp;</span>&nbsp;</p>
<p>Be sure to leave the line that notifies Windows Troubleshooting Platform of the root cause status:</p>
<p style="padding-left: 30px;"><span style="font-family: terminal,monaco;">#The following line notifies Windows Troubleshooting Platform of the status of this root cause</span><br /><span style="font-family: terminal,monaco;">update-diagrootcause -id $RootCauseId -detected $RootCauseDetected</span></p>
<p>Next update the resolver script (RS_IncorrectRegValue.ps1).&nbsp; When you first open it, it will look like this:</p>
<p style="padding-left: 30px;"><span style="font-family: terminal,monaco;"># Resolver Script - This script fixes the root cause. It only runs if the </span><span style="font-family: terminal,monaco;">Troubleshooter detects the root cause.</span><br /><span style="font-family: terminal,monaco;"># Key cmdlets:</span><br /><span style="font-family: terminal,monaco;"># -- get-diaginput invokes an interactions and returns the response</span><br /><span style="font-family: terminal,monaco;"># -- write-diagprogress displays a progress string to the user</span><br /><br /><span style="font-family: terminal,monaco;"># Your logic to fix the root cause here</span></p>
<p>Now replace &ldquo;<span style="font-family: terminal,monaco;"># Your logic to fix the root cause here</span> &rdquo; with this:</p>
<p style="padding-left: 30px;"><span style="font-family: terminal,monaco;">$regPath = "HKCU:\Software\Microsoft\Windows\DWM"</span><br /><span style="font-family: terminal,monaco;">$value = "Composition"</span><br /><span style="font-family: terminal,monaco;">$data = 1</span><br /><br /><span style="font-family: terminal,monaco;">Set-ItemProperty $regPath $value $data</span></p>
<p>Be sure to save your scripts and your project.&nbsp; You&rsquo;re now ready to test you troubleshooter!</p>
<p><b>Step 10 &ndash; Test your troubleshooter:</b> In Troubleshooting Pack Designer, select &ldquo;Build &gt; Run&rdquo; or press F5 to build and run the troubleshooter.&nbsp; You should end up with a screen that looks like the screenshot below.&nbsp;</p>
<p>Be sure to check regedit and see that the &ldquo;Composition&rdquo; value data under<span style="font-family: Cambria; font-size: small;" face="Cambria" size="3"> </span>HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM has been changed from 0 to 1 (if it was already 1, then Windows Troubleshooting Platform gives you a window that says &ldquo;Troubleshooting couldn&rsquo;t identify the problem&rdquo;).&nbsp; To test that Aero has been enabled, you will have to log off and log back on.&nbsp;&nbsp; You now have a troubleshooting pack that checks a specific registry value and data, and changes it if it&rsquo;s in a particular state.&nbsp; Such is the versatility of PowerShell combined with Windows Troubleshooting Platform.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/6663.EnableAeroFixed.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/6663.EnableAeroFixed.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/6663.EnableAeroFixed.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/6663.EnableAeroFixed.png" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Device error troubleshooting sample</title>
      <link>https://docs.microsoft.com/archive/blogs/justtroubleshootme/device-error-troubleshooting-sample</link>
      <pubDate>Tue, 10 Jul 2012 15:09:00 GMT</pubDate>
      <dc:creator><![CDATA[Ivona Kaczynski]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/justtroubleshootme/2012/07/10/device-error-troubleshooting-sample/</guid>
      <description><![CDATA[As much as we might want to live in a world with perfectly operating PCs, reality dictates that they...]]></description>
      <content:encoded><![CDATA[<p>As much as we might want to live in a world with perfectly operating PCs, reality dictates that they just don&rsquo;t work all the time.&nbsp; When it comes to the growing list of devices installed on PCs, troubleshooting which one is causing the problem has gotten increasingly challenging.&nbsp; Occasionally you will find devices in the device manager list in error states.&nbsp; Sometimes they are in such a state because the device driver was not found by Windows Update, or the driver is out of date.&nbsp; Devices may be disabled by Group Policy, other services, or even mistakenly by the user.&nbsp; It can be tedious and time-consuming for the user to troubleshoot these kinds of issues, so having a way to automate the diagnosis and resolution of the problem would help them quickly get back to using their device.&nbsp;</p>
<p>In such times it may be useful to enumerate all problem devices on a machine, filter them by error code, and handle each of those devices uniquely based on a combination of error code and one of their properties (we will be accessing these properties in PowerShell via WMI).&nbsp; In this example, we will learn how to build a troubleshooting pack that finds all devices with a particular error state.&nbsp; If any devices are found with the designated error code we are looking for, we will create an array of these devices&rsquo; DeviceIDs and resolve each device based on a combination of knowing our error code and DeviceID of the device(s) of interest.&nbsp; Of course there are many ways to solve this kind of problem, based on the known and unknown variables in the troubleshooting process.&nbsp; For example, you can filter your list using other Win32_PnPEntity properties of the device, so long as they are available to the OS whether the driver is installed or not and the property data is unique enough to set them apart from other devices.&nbsp; You can also filter for other kinds of device error codes.&nbsp; This is just one example that can easily be tailored to suit your specific needs.</p>
<p>In the case of a missing driver, we know the ConfigManagerErrorCode is Code 28 (0x1C).&nbsp; Let&rsquo;s say we want to create an automated troubleshooter for an audio device with a driver that has not been installed.&nbsp; During the troubleshooting experience, we would like the user to be redirected to a web page where they can quickly and easily download the driver.&nbsp; Alternatively, they can be given a direct link to the driver itself, where upon clicking the link they will automatically begin the driver installation process without having to search for a download link on a webpage.</p>
<p>Before getting started with this example, you will want to make sure you have installed Windows Troubleshooting Pack Designer.&nbsp; The steps for doing so are listed <a href="http://blogs.technet.com/b/justtroubleshootme/archive/2012/07/10/installing-troubleshooting-pack-designer.aspx"><span style="color: #0000ff;" color="#0000ff">here</span></a>.</p>
<p>Let&rsquo;s begin with the logic of what we want to do in PowerShell.&nbsp; Then we&rsquo;ll work this logic into the Windows Troubleshooting Platform framework with Troubleshooting Pack Designer.&nbsp; Don&rsquo;t worry about following along and adding code anywhere yet &ndash; this is just to give you the building blocks that we will use later when we actually build the scripts with troubleshooting pack designer.&nbsp; As we plan the troubleshooter, note the basic structure of the WTP framework:</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/4540.TroubleshootingSequence.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/4540.TroubleshootingSequence.png"><img style="margin-right: auto; margin-left: auto; display: block;" border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/4540.TroubleshootingSequence.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/230x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/4540.TroubleshootingSequence.png" /></a></p>
<p>The main root cause detection logic resides in the troubleshooter script.&nbsp; If you detect a root cause, the troubleshooter uses the<span style="font-family: Cambria;" face="Cambria"> </span>Update-DiagRootCause<span style="font-family: Cambria;" face="Cambria"> </span>cmdlet to handoff relevant information to the resolver.&nbsp; The required parameters associated with this cmdlet are -id and -detected.&nbsp; The -id parameter represents the identifier string for the root cause you want to update and the -detected parameter represents whether the root cause was detected or not.&nbsp; Optional parameters are the -InstanceId and -Parameter parameters, representing the specific instance of the root cause and information passed from the troubleshooters to the resolver, respectively.&nbsp; In this example, the use of both required and optional parameters will be demonstrated.</p>
<table style="width: 100%; border-collapse: collapse;" cellspacing="0" cellpadding="0">
<tbody>
<tr><th style="text-align: left; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; background-color: #c0c0c0;"><img style="border: 0px solid currentColor;" alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/CommunityServer-Wikis-Components-Files/00-00-00-00-05/1731.Note.gif" /> <strong>Note</strong></th></tr>
<tr>
<td style="padding-left: 5px; background-color: #f0f0f0;">
<p>Reference material:</p>
<ul>
<li>For more information on how device error code are obtained, please reference the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa394353(v=vs.85).aspx"><span style="color: #0000ff;" color="#0000ff">Win32_PnPEntity class</span></a> ConfigManagerErrorCode table</li>
<li>Update-DiagRootCause: For more information on the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd323767(v=vs.85).aspx"><span style="color: #0000ff;" color="#0000ff">Update-DaigRootCause cmdlet</span></a>, please review the documentation on MSDN.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong><span style="font-size: medium;">Building the Troubleshooter Logic</span></strong></p>
<p>First we need to build a list of devices on the PC that are giving us an Error Code 28 (0x1C).&nbsp; It is important to pause here and consider that we may want to use this code to filter for more than just one error code.&nbsp; For example, error code 18 (0x12) reports that Device drivers must be reinstalled.&nbsp; In many cases this could warrant the same resolution as Error code 28.&nbsp; Thus, we should build our code to handle more than one error code at a time.&nbsp;</p>
<p>We will do this by creating an array called<span style="font-family: Cambria;" face="Cambria"> </span>$BrokenDevices<span style="font-family: Cambria;" face="Cambria"> </span>and assign to it devices that are reporting the Error code(s) we are interested in.&nbsp; Let&rsquo;s first create a hash table called<span style="font-family: Cambria;" face="Cambria"> </span>$ErrorCodeList to store the Error codes.&nbsp; We will then use the<span style="font-family: Cambria;" face="Cambria"> </span>Get-WmiObject<span style="font-family: Cambria;" face="Cambria"> </span>cmdlet and the<span style="font-family: Cambria;" face="Cambria"> </span>Win32_PnPEntity<span style="font-family: Cambria;" face="Cambria"> </span>class to get our list of these devices (stored in $AllDevices).&nbsp; Next we create the $BrokenDevices<span style="font-family: Cambria;" face="Cambria"> </span>array to store the list of broken devices.&nbsp; In the script we&rsquo;ll iterate through each of these filtered items using a<span style="font-family: Cambria;" face="Cambria"> </span>foreach<span style="font-family: Cambria;" face="Cambria"> </span>loop to obtain their Device ID and build an array out of it as follows:</p>
<pre class="PowerShellColorizedScript"><span style="color: #006400;">#build hashtable of Error Codes to filter for in the device list</span>            
<span style="color: #ff4500;">$ErrorCodeList</span> <span style="color: #a9a9a9;">=</span> <span style="color: #000000;">@{</span><span style="color: #000000;">}</span>            
<span style="color: #ff4500;">$ErrorCodeList</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">Add</span><span style="color: #000000;">(</span><span style="color: #800080;">18</span><span style="color: #a9a9a9;">,</span><span style="color: #800080;">18</span><span style="color: #000000;">)</span>            
<span style="color: #ff4500;">$ErrorCodeList</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">Add</span><span style="color: #000000;">(</span><span style="color: #800080;">28</span><span style="color: #a9a9a9;">,</span><span style="color: #800080;">28</span><span style="color: #000000;">)</span>            
<span style="color: #006400;">#...and so forth for additional error codes</span>            
            
<span style="color: #006400;">#Get our list of devices</span>            
<span style="color: #ff4500;">$AllDevices</span> <span style="color: #a9a9a9;">=</span> <span style="color: #0000ff;">Get-WmiObject</span> <span style="color: #8a2be2;">Win32_PnPEntity</span>            
            
<span style="color: #006400;">#Create array for the filtered devices</span>            
<span style="color: #ff4500;">$BrokenDevices</span> <span style="color: #a9a9a9;">=</span> <span style="color: #000000;">@(</span><span style="color: #000000;">)</span>            
            
<span style="color: #006400;">#filter by values selected in ErrorCodeList</span>            
<span style="color: #00008b;">foreach</span> <span style="color: #000000;">(</span><span style="color: #ff4500;">$device</span> <span style="color: #00008b;">in</span> <span style="color: #ff4500;">$AllDevices</span><span style="color: #000000;">)</span>            
<span style="color: #000000;">{</span>            
    <span style="color: #00008b;">if</span> <span style="color: #000000;">(</span><span style="color: #ff4500;">$ErrorCodeList</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">ContainsValue</span><span style="color: #000000;">(</span><span style="color: #008080;">[int]</span><span style="color: #ff4500;">$Device</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">ConfigManagerErrorCode</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>            
    <span style="color: #000000;">{</span>            
        <span style="color: #ff4500;">$BrokenDevices</span> <span style="color: #a9a9a9;">+=</span> <span style="color: #ff4500;">$device</span>            
    <span style="color: #000000;">}</span>            
<span style="color: #000000;">}</span></pre>
<p>Next we need to define the logic for what happens when this array is successfully populated with at least one item.&nbsp; In the context of the Windows Troubleshooting Platform framework, this means that we have indeed found a root cause&mdash;at least one device is having a problem.&nbsp; This part may not be relevant in regular PowerShell scripting, but with WTP it is important &ndash; in order to use the framework properly, we must raise a flag that flips our&nbsp;-detected parameter&nbsp;to $true.&nbsp; We must also pass the relevant parameters obtained while troubleshooting, namely the PNP Device IDs.&nbsp; For now all you need to know is that we use<span style="font-family: Cambria;" face="Cambria"> </span>Update-DiagRootCause iteratively, in other words we are looping through the list of broken devices and essentially calling the resolver script for each one:</p>
<pre class="PowerShellColorizedScript"><span style="color: #006400;">#update the resolver for each instance of a device in the $BrokenDevices list</span>            
<span style="color: #00008b;">foreach</span> <span style="color: #000000;">(</span><span style="color: #ff4500;">$erroredDevice</span> <span style="color: #00008b;">in</span> <span style="color: #ff4500;">$BrokenDevices</span><span style="color: #000000;">)</span>            
<span style="color: #000000;">{</span>            
                
    <span style="color: #0000ff;">Update-DiagRootCause</span> <span style="color: #000080;">-id</span> <span style="color: #ff4500;">$RootCauseId</span> <span style="color: #000080;">-detected</span> <span style="color: #ff4500;">$true</span> <span style="color: #000080;">-InstanceId</span> <span style="color: #ff4500;">$erroredDevice</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">PNPDeviceID</span> <span style="color: #000080;">-Parameter</span> <span style="color: #000000;">@{</span><span style="color: #8b0000;">"ID"</span> <span style="color: #a9a9a9;">=</span> <span style="color: #ff4500;">$erroredDevice</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">PNPDeviceID</span><span style="color: #000000;">}</span>            
<span style="color: #000000;">}</span></pre>
<p><span style="font-size: medium;"><strong>Building the Resolver Logic</strong></span></p>
<p>Now comes the fun part &ndash; determining what happens now that we have found the broken devices!&nbsp; In our case, we want to present a window that offers additional instructions to the user as well as an URL to the page or the driver itself.&nbsp; This is where Windows Troubleshooting Platform really starts to demonstrate its utility.&nbsp; As a support developer or IT Admin, you may not want to be stuck having to deal with figuring out how to create message windows with link text in your script.&nbsp; You&rsquo;ll see how to use Troubleshooting Pack Designer to build these interactions fairly quickly without mucking around with the code too much at all.&nbsp; For now, let&rsquo;s just take a look at the basic PowerShell logic that we would use as a resolution to the problem.&nbsp; We will build a script that handles each Device ID that was found in the troubleshooting script with a unique interaction, so we must declare our parameters and build a switch statement:</p>
<pre class="PowerShellColorizedScript"><span style="color: #006400;">#declare parameters from the troubleshooting script</span>            
<span style="color: #00008b;">PARAM</span><span style="color: #000000;">(</span><span style="color: #ff4500;">$ID</span><span style="color: #000000;">)</span>            
            
<span style="color: #006400;">#handle each parameter passed uniquely</span>            
<span style="color: #00008b;">switch</span> <span style="color: #000000;">(</span><span style="color: #ff4500;">$ID</span><span style="color: #000000;">)</span>            
<span style="color: #000000;">{</span>            
    <span style="color: #8b0000;">"[Insert Device ID 0 here]"</span>            
    <span style="color: #000000;">{</span>            
        <span style="color: #006400;">#Show Text interaction window with URLs for Device 0</span>            
        <span style="color: #0000ff;">Get-DiagInput</span> <span style="color: #000080;">-id</span> <span style="color: #8b0000;">"INT_ShowURL0"</span>            
    <span style="color: #000000;">}</span>            
    <span style="color: #8b0000;">"[Insert Device ID 1 here]"</span>            
    <span style="color: #000000;">{</span>            
        <span style="color: #006400;">#Show Text interaction window with URLs for Device 0</span>            
        <span style="color: #0000ff;">Get-DiagInput</span> <span style="color: #000080;">-id</span> <span style="color: #8b0000;">"INT_ShowURL1"</span>            
    <span style="color: #000000;">}</span>            
    <span style="color: #8b0000;">"[Insert Device ID 2 here]"</span>            
    <span style="color: #000000;">{</span>            
        <span style="color: #006400;">#Show Text interaction window with URLs for Device 0</span>            
        <span style="color: #0000ff;">Get-DiagInput</span> <span style="color: #000080;">-id</span> <span style="color: #8b0000;">"INT_ShowURL2"</span>            
    <span style="color: #000000;">}</span>            
    <span style="color: #8b0000;">"[Insert Device ID 3 here]"</span>            
    <span style="color: #000000;">{</span>            
        <span style="color: #006400;">#Show Text interaction window with URLs for Device 0</span>            
        <span style="color: #0000ff;">Get-DiagInput</span> <span style="color: #000080;">-id</span> <span style="color: #8b0000;">"INT_ShowURL3"</span>            
    <span style="color: #000000;">}</span>            
    <span style="color: #8a2be2;">default</span>            
    <span style="color: #000000;">{</span>            
        <span style="color: #0000ff;">Get-DiagInput</span> <span style="color: #000080;">-id</span> <span style="color: #8b0000;">"INT_ShowURLDefault"</span>            
    <span style="color: #000000;">}</span>            
<span style="color: #000000;">}</span></pre>
<p>As mentioned above, this script filters a set of devices by the DeviceID (a string) and handles each of them with unique <i>interactions</i>.&nbsp; Interactions are built into Windows Troubleshooting Platform and can be created/customized with Windows Troubleshooting Pack Designer.&nbsp; In our case, the interactions will present a window with text and an URL for the user to click on as shown below:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/2275.Pic1.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/2275.Pic1.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/2275.Pic1.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/2275.Pic1.png" /></a></p>
<p>For now, all you need to know is that interactions are identified in PowerShell by their <i>interaction IDs</i>.&nbsp;&nbsp; As a developer, you can decide the names of these interaction IDs.&nbsp; In the example above, the interactions IDs are &ldquo;INT_ShowURL0&rdquo;, &ldquo;INT_ShowURL1&rdquo;, &ldquo;INT_ShowURL2&rdquo;, and &ldquo;INT_ShowURL3&rdquo;.&nbsp; You will also want to build a &ldquo;default&rdquo; interaction in case a device in the list of broken devices doesn&rsquo;t match one of the device ID we&rsquo;ve specified in the switch statement.&nbsp;</p>
<table style="width: 100%; border-collapse: collapse;" cellspacing="0" cellpadding="0">
<tbody>
<tr><th style="text-align: left; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; background-color: #c0c0c0;"><img style="border: 0px solid currentColor;" alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/CommunityServer-Wikis-Components-Files/00-00-00-00-05/1731.Note.gif" /> <strong>Note</strong></th></tr>
<tr>
<td style="padding-left: 5px; background-color: #f0f0f0;">
<p>Reference material:</p>
<ul>
<li>For more information about interactions, see the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd323717(v=vs.85).aspx"><span style="color: #0000ff;" color="#0000ff">MSDN documentation on interacting with the user</span></a>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size: medium;"><strong>Building the Verifier Logic</strong></span></p>
<p>You may be wondering about the verifier script. &nbsp;For now, we won&rsquo;t worry about it because we will simply reuse the logic from the troubleshooter to make sure the root cause is not there anymore.&nbsp; If the steps that occurred during the resolution phase were unsuccessful, then the root cause would still exist and the troubleshooter, if run again, would return with a root cause detection of $true.&nbsp; Troubleshooting Pack Designer has a way for us to decide to use this verification method, which you will see in later steps.</p>
<p><span style="font-size: medium;"><strong>Building the Troubleshooting Pack</strong></span></p>
<p>Now that we have a sense of our logic and where our interactions will occur, let&rsquo;s build it into a troubleshooting pack.&nbsp; Open Troubleshooting Pack Designer and create a new project with the name &ldquo;DeviceDriverExample&rdquo;:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0741.Pic2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0741.Pic2.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0741.Pic2.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0741.Pic2.png" /></a></p>
<p>Now add a project description.&nbsp; This should briefly describe what the troubleshooting pack accomplishes.&nbsp; Be sure to keep the description to less than 100 characters.&nbsp; Copy and paste the following text for the Project Description: &ldquo;Check for problem devices and show the user how to resolve the problem&rdquo;.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0525.Pic3.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0525.Pic3.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0525.Pic3.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0525.Pic3.png" /></a></p>
<p>The privacy URL can be left blank for now.&nbsp; You should include your own URL to your privacy statement before releasing your troubleshooter.</p>
<p>Click &ldquo;Add New Root Cause&rdquo; in Project Explorer on the left side.</p>
<p>The Root Cause ID is the unique ID for the problem we&rsquo;re going to find and fix.&nbsp; We&rsquo;ll use this ID in PowerShell to&nbsp;inform the framework if we&rsquo;ve found a problem.<span style="font-family: Cambria; font-size: small;" face="Cambria" size="3">&nbsp; </span>We will call our root cause &ldquo;DeviceError&rdquo; since if any device returns an error code that reports a missing driver, then we can flag our root cause detected state to true.&nbsp; The root cause name should be &ldquo;Device Error&rdquo; and description should be something similar to the following: &ldquo;The devices enumerated on the PC may have various error states.&nbsp; Remember, root cause detection is determined by filtering one or more ConfigManagerErrorCode(s) associated with a device.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/5342.Pic4.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/5342.Pic4.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/5342.Pic4.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/5342.Pic4.png" /></a></p>
<p>Now click &ldquo;Next&rdquo; in the upper right hand corner or &ldquo;Define Troubleshooter&rdquo; in Project Explorer on the left.&nbsp; In this next screen, you can leave everything as it is.&nbsp; Most of it is fairly self-explanatory.&nbsp; We will not be using interactions in the troubleshooter in this case, and will use them as part of the resolver instead:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/2844.Pic5.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/2844.Pic5.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/2844.Pic5.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/2844.Pic5.png" /></a></p>
<p>Click &ldquo;Next&rdquo; on the right again, or &ldquo;Define Resolver&rdquo; on the left.&nbsp; Your resolver name should be &ldquo;DriverDownload&rdquo; and the description should be something about the solution to the root cause like: &ldquo;This resolver redirects the user to an URL where they can download the correct device driver&rdquo;.&nbsp; In this example, we will be using interactions AND parameters, so select &ldquo;Yes&rdquo; for both the &ldquo;Interactions&rdquo; and &ldquo;Parameters&rdquo; options.&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/3666.Pic6.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/3666.Pic6.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/3666.Pic6.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/3666.Pic6.png" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/2625.Pic7.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/2625.Pic7.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/2625.Pic7.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/2625.Pic7.png" /></a></p>
<p>Under &ldquo;Interactions&rdquo;, click the &ldquo;Add Interaction&rdquo; button.&nbsp; This will launch the Interaction Designer.&nbsp; Notice the drop down menu under &ldquo;What interaction do you want to define?&rdquo;.&nbsp; We simply want to show the user some text to redirect them to an URL, so &ldquo;Show Text&rdquo; will be the best option.&nbsp; Let&rsquo;s call our first interaction &ldquo;INT_ShowURL0&rdquo;, and the question we ask the user (&ldquo;Question or Prompt&rdquo;) should be something like &ldquo;Please download and install the latest driver for this device&rdquo;.&nbsp; The &ldquo;Explanation Text&rdquo; should explain more about the prompt.&nbsp; Type &ldquo;Follow the link below to download the correct driver&rdquo;.&nbsp; For now, let&rsquo;s ignore Interaction Caching and leave it selected as &ldquo;No&rdquo; and let&rsquo;s add a Help Link.&nbsp; Select &ldquo;Yes&rdquo; under &ldquo;Help Link&rdquo; and add your Link Text and URL.&nbsp; This will be the URL for the user to download the correct driver.&nbsp; You text should describe where the user will be directed and correspond with the name of audio device you are troubleshooting, such as &ldquo;Driver for HD Audio Device&rdquo;.&nbsp; Find an URL that you&rsquo;d like your user to visit, otherwise for this example, use <a href="http://www.microsoft.com/hardware/en-us/downloads"><span style="color: #0000ff;" color="#0000ff">http://www.microsoft.com/hardware/en-us/downloads</span></a>.&nbsp; Selecting &ldquo;Yes&rdquo; to &ldquo;Do you want to draw additional attention to the help link&rdquo; will bring the help link up closer to the interaction text, so it can be good practice to do so.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/3312.Pic8.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/3312.Pic8.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/3312.Pic8.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/3312.Pic8.png" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/1212.Pic9.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/1212.Pic9.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/1212.Pic9.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/1212.Pic9.png" /></a></p>
<p>Click &ldquo;OK&rdquo; and select &ldquo;Add Interaction&rdquo; again.&nbsp; This time use the following to populate the fields:</p>
<ul>
<li>Interaction type: Show Text</li>
<li>Interaction ID: INT_ShowURLDefault</li>
<li>Question or Prompt: No matching case</li>
<li>Explanation: The device driver was not found.</li>
<li>Help Link: Yes</li>
<li>Link Text: Try to find drivers at <a href="http://www.microsoft.com/"><span style="color: #0000ff;" color="#0000ff">www.microsoft.com</span></a></li>
<li>Link Target: <a href="http://www.microsoft.com/hardware/en-us/downloads"><span style="color: #0000ff;" color="#0000ff">http://www.microsoft.com/hardware/en-us/downloads</span></a></li>
<li>Draw additional attention to help link? Yes</li>
</ul>
<p>Click &ldquo;OK&rdquo;.&nbsp; We can add more interactions later (as our switch statement actually requires 4 different interactions to really work) &ndash; for the sake of brevity, let&rsquo;s just use two interactions for now and modify our script accordingly.&nbsp;</p>
<p>Now we can define our parameters.&nbsp; Parameters allow data to be passed from one phase of the troubleshooter to another, just like parameters for a function.&nbsp; In this case, we want to pass information we collected in the root cause detection phase to the resolver script.&nbsp; Before we can use those parameters in the resolver script we must define them for troubleshooting platform.&nbsp; Parameters reference data collected by the scripts during the troubleshooting process.&nbsp;</p>
<p>After selecting &ldquo;Yes&rdquo; for the Parameters option, you should now have a blank Parameter table as shown below:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0027.Pic10.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0027.Pic10.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0027.Pic10.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0027.Pic10.png" /></a></p>
<p>Click the &ldquo;Add Parameter&rdquo; button.&nbsp; The &ldquo;Name&rdquo; field will populate with &ldquo;Parameter1&rdquo; and the &ldquo;Default Value&rdquo; to &ldquo;Default&rdquo;.&nbsp; Select &ldquo;Parameter1&rdquo; and change the name to &ldquo;ID&rdquo;.&nbsp; This name will be used in identifying the information you will pass between the troubleshooting script and the resolver script in PowerShell (remember the parameter -Parameter @{"ID" = $erroredDevice.PNPDeviceID} in the troubleshooting logic and the PARAM($ID) line from our resolution logic?&nbsp; The string &ldquo;ID&rdquo; corresponds with these and must be the same between your scripts and what you define in Troubleshooting Pack Designer.&nbsp; Your parameter list should now look as it does below:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/8463.Pic11.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/8463.Pic11.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/8463.Pic11.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/8463.Pic11.png" /></a></p>
<p>Click &ldquo;Next&rdquo; in the upper right or &ldquo;Define Verifier&rdquo; on the left.&nbsp; Recall that we are reusing the troubleshooting script as a verifier, so nothing needs to be changed here.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/8105.Pic12.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/8105.Pic12.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/8105.Pic12.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/8105.Pic12.png" /></a></p>
<p>Click on &ldquo;Next&rdquo; or &ldquo;Edit Root Cause Scripts&rdquo;.&nbsp; It&rsquo;s now time to add your PowerShell!&nbsp; You should now see links to edit your troubleshooter and resolver scripts.&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0576.Pic13.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0576.Pic13.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0576.Pic13.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0576.Pic13.png" /></a></p>
<p>Note that using the links in Troubleshooting Pack Designer is no different from just opening the .ps1 script in the project directory.&nbsp; By default, the troubleshooting pack project is created in My Documents &gt; troubleshooting packs.&nbsp; You will see the .diag file which is the troubleshooting pack designer file you can edit, the ProjectFile.xml, and the troubleshooter and resolver script files that the Designer created for you (RS_DeviceError.ps1 and TS_DeviceError.ps1).&nbsp; These are the files that will need to be updated with PowerShell logic so the troubleshooting pack works as intended.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0218.Pic14.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0218.Pic14.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0218.Pic14.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0218.Pic14.png" /></a></p>
<p>Now to add our PowerShell code!&nbsp; Let&rsquo;s go back to the Scripts section of troubleshooting pack designer and edit our scripts.&nbsp; Click on &ldquo;Edit Troubleshooter Script&rdquo;.&nbsp; You should now see a PowerShell ISE window open with your troubleshooter script framework as follows:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/1488.Pic15.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/1488.Pic15.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/1488.Pic15.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/1488.Pic15.png" /></a></p>
<p>This is the basic structure of a troubleshooter.&nbsp; The bare essentials are the $RootCauseID (treated as a string) and $RootCauseDetected (treated as a boolean).&nbsp; As we mentioned before, the $parameters hash table variable is optional and will not always be there &ndash; it depends on if you have specified the need for parameters while you were setting up your project in Troubleshooting Pack Designer.&nbsp; Notice the declaration of the $parameters hash table that has been created for you in the second line of the script.&nbsp; In this key-value pair, the key is the name you provided in Troubleshooting Pack Designer (&ldquo;ID&rdquo;) and its default value is &ldquo;Default&rdquo;.&nbsp; The Designer added this line of script for you when you specified your parameter name through the user interface earlier.</p>
<p>When we build logic into the troubleshooter, we want to consider the end result of the logic flow, with the most important part being whether root cause detection is $true or $false.&nbsp; This result gets passed through the update-diagrootcause cmdlet at the end of the troubleshooting script which relays information to the resolver script, such as whether it should run based on the result of the detection and other developer-specified information collected during troubleshooting ($parameters).&nbsp; We will now incorporate the PowerShell logic we created earlier into the TS_DeviceError.ps1 script:</p>
<p>Copy and paste the following code immediately after the [HashTable]$parameters = @{"ID"="Default"} line:</p>
<pre class="PowerShellColorizedScript"><span style="color: #006400;">#build hashtable of Error Codes to filter for in the device list</span>            
<span style="color: #ff4500;">$ErrorCodeList</span> <span style="color: #a9a9a9;">=</span> <span style="color: #000000;">@{</span><span style="color: #000000;">}</span>            
<span style="color: #ff4500;">$ErrorCodeList</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">Add</span><span style="color: #000000;">(</span><span style="color: #800080;">18</span><span style="color: #a9a9a9;">,</span><span style="color: #800080;">18</span><span style="color: #000000;">)</span>            
<span style="color: #ff4500;">$ErrorCodeList</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">Add</span><span style="color: #000000;">(</span><span style="color: #800080;">28</span><span style="color: #a9a9a9;">,</span><span style="color: #800080;">28</span><span style="color: #000000;">)</span>            
<span style="color: #006400;">#...and so forth</span>            
            
<span style="color: #006400;">#Get our list of devices</span>            
<span style="color: #ff4500;">$AllDevices</span> <span style="color: #a9a9a9;">=</span> <span style="color: #0000ff;">Get-WmiObject</span> <span style="color: #8a2be2;">Win32_PnPEntity</span>            
            
<span style="color: #006400;">#Create array for the filtered devices</span>            
<span style="color: #ff4500;">$BrokenDevices</span> <span style="color: #a9a9a9;">=</span> <span style="color: #000000;">@(</span><span style="color: #000000;">)</span>            
            
<span style="color: #006400;">#filter by values selected in ErrorCodeList</span>            
<span style="color: #00008b;">foreach</span> <span style="color: #000000;">(</span><span style="color: #ff4500;">$device</span> <span style="color: #00008b;">in</span> <span style="color: #ff4500;">$AllDevices</span><span style="color: #000000;">)</span>            
<span style="color: #000000;">{</span>            
    <span style="color: #00008b;">if</span> <span style="color: #000000;">(</span><span style="color: #ff4500;">$ErrorCodeList</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">ContainsValue</span><span style="color: #000000;">(</span><span style="color: #008080;">[int]</span><span style="color: #ff4500;">$Device</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">ConfigManagerErrorCode</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>            
    <span style="color: #000000;">{</span>            
        <span style="color: #ff4500;">$BrokenDevices</span> <span style="color: #a9a9a9;">+=</span> <span style="color: #ff4500;">$device</span>            
    <span style="color: #000000;">}</span>            
<span style="color: #000000;">}</span></pre>
<p>We now need to update our resolver for each device that has an error.&nbsp; Delete the line &ldquo;update-diagrootcause -id $RootCauseId -detected $RootCauseDetected -parameter $parameters&rdquo; and replace it with the following:</p>
<pre class="PowerShellColorizedScript"><span style="color: #006400;">#update the resolver for each instance of a device in the $BrokenDevices list</span>            
<span style="color: #00008b;">foreach</span> <span style="color: #000000;">(</span><span style="color: #ff4500;">$erroredDevice</span> <span style="color: #00008b;">in</span> <span style="color: #ff4500;">$BrokenDevices</span><span style="color: #000000;">)</span>            
<span style="color: #000000;">{</span>            
                
    <span style="color: #0000ff;">Update-DiagRootCause</span> <span style="color: #000080;">-id</span> <span style="color: #ff4500;">$RootCauseId</span> <span style="color: #000080;">-detected</span> <span style="color: #ff4500;">$true</span> <span style="color: #000080;">-InstanceId</span> <span style="color: #ff4500;">$erroredDevice</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">PNPDeviceID</span> <span style="color: #000080;">-Parameter</span> <span style="color: #000000;">@{</span><span style="color: #8b0000;">"ID"</span> <span style="color: #a9a9a9;">=</span> <span style="color: #ff4500;">$erroredDevice</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">PNPDeviceID</span><span style="color: #000000;">}</span>            
<span style="color: #000000;">}</span></pre>
<p>Save your script (CTRL+S) and close the window.&nbsp; Now open your resolver script by returning to Troubleshooting Pack Designer and selecting &ldquo;Edit Resolver Script&rdquo; in the Root Cause Scripts view.&nbsp; You should see the following:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/1050.Pic16.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/1050.Pic16.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/1050.Pic16.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/1050.Pic16.png" /></a></p>
<p>In this script, Troubleshooting Pack Designer has given you the code to accept the troubleshooter parameters as well as basic code to trigger the interaction using the Get-DiagInput cmdlet.&nbsp; However, the way it is written now triggers the interaction as soon as the resolver script runs.&nbsp; We want to control how the interaction happens by using our switch statement.&nbsp; Replace $INT_ShowURL0Result = get-diaginput -id "INT_ShowURL0" with the following code:</p>
<pre class="PowerShellColorizedScript"><span style="color: #006400;"># --declare parameters</span>            
<span style="color: #00008b;">PARAM</span><span style="color: #000000;">(</span><span style="color: #ff4500;">$ID</span><span style="color: #000000;">)</span>            
            
<span style="color: #006400;">#handle each parameter passed uniquely</span>            
<span style="color: #00008b;">switch</span> <span style="color: #000000;">(</span><span style="color: #ff4500;">$ID</span><span style="color: #000000;">)</span>            
<span style="color: #000000;">{</span>            
    <span style="color: #8b0000;">"HDAUDIO\FUNC_01&amp;VEN_10DE&amp;DEV_000A&amp;SUBSYS_10DE0101&amp;REV_1001\5&amp;18844406&amp;0&amp;0301"</span>            
    <span style="color: #000000;">{</span>            
        <span style="color: #0000ff;">Get-DiagInput</span> <span style="color: #000080;">-id</span> <span style="color: #8b0000;">"INT_ShowURL0"</span>            
    <span style="color: #000000;">}</span>            
    <span style="color: #8a2be2;">default</span>            
    <span style="color: #000000;">{</span>            
        <span style="color: #0000ff;">Get-DiagInput</span> <span style="color: #000080;">-id</span> <span style="color: #8b0000;">"INT_ShowURLDefault"</span>            
    <span style="color: #000000;">}</span>            
<span style="color: #000000;">}</span></pre>
<pre class="PowerShellColorizedScript"><span style="color: #000000;"></span></pre>
<table style="width: 100%; border-collapse: collapse;" cellspacing="0" cellpadding="0">
<tbody>
<tr><th style="text-align: left; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; background-color: #c0c0c0;"><img style="border: 0px solid currentColor;" alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/CommunityServer-Wikis-Components-Files/00-00-00-00-05/1731.Note.gif" /> <strong>Note</strong></th></tr>
<tr>
<td style="padding-left: 5px; background-color: #f0f0f0;">
<p>Reference material:</p>
<ul>
<li>&nbsp;Get-DiagInput:&nbsp; For more infromation on the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd323715(v=vs.85).aspx"><span style="color: #0000ff;" color="#0000ff">get-diaginput</span></a> cmdlet, please review the documentation on MSDN</li>
</ul>
</td>
</tr>
</tbody>
</table>
<pre class="PowerShellColorizedScript"><span style="color: #000000;"></span></pre>
<p><strong><span style="font-size: medium;">Testing the troubleshooting pack</span></strong></p>
<p>This is where it gets tricky to test whether your troubleshooter works &ndash; because we are filtering for Device IDs, the Device ID listed above should be present on your machine.&nbsp; If you don&rsquo;t have the device in the first case presented above on the target PC, then you will only hit the default case.&nbsp; For test purposes, let&rsquo;s just make sure the default interaction gets hit, and then later you&rsquo;ll learn how to look up a Device ID and create an error to test for.&nbsp; One more gotcha &ndash; <b>in order for this troubleshooter to return true for a root cause, you must have at least one device on your PC in an error state</b>.&nbsp; To accomplish this, go to Device Manager and temporarily disable a device (for example a sound device) by right clicking on it and selecting &ldquo;Disable&rdquo;.</p>
<p>Save your resolver script and go back to Troubleshooting Pack Designer.&nbsp; It is time to see if all this works!&nbsp; Press F5.&nbsp; You will see the troubleshooting pack being built and signed.&nbsp; Next you should see the following:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/6052.Pic17.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/6052.Pic17.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/6052.Pic17.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/6052.Pic17.png" /></a></p>
<p>Click Next &ndash; if the device listed in the sample code is not on your PC then you should see this screen (this is the default interaction you created, INT_ShowURLDefault):</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0654.Pic18.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0654.Pic18.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0654.Pic18.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0654.Pic18.png" /></a></p>
<p>Click &ldquo;Next&rdquo; and the troubleshooter will run as a verifier to see if the problem was fixed.&nbsp; The logic detected that the device was not repaired, so the troubleshooting report shows that a problem was found but not fixed:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0638.Pic19.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0638.Pic19.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/0638.Pic19.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/0638.Pic19.png" /></a></p>
<p>At this point, you may be wondering how to find a device ID for a device on your PC and actually test this troubleshooter!&nbsp; Unfortunately, we won&rsquo;t be able to test it unless you want to uninstall drivers for your device, and we would like to avoid that right now.&nbsp; Why don&rsquo;t we try a different error code? It is easy to detect whether a device is disabled and then enable it as part of the resolution process.&nbsp; The ConfigManagerErrorCode for this is 22 (0x16).&nbsp; Let&rsquo;s modify our code to look for Error code 22, and look for our disabled device&rsquo;s PNP Device ID.&nbsp; Remember that you already disabled a device in device manager earlier, so let&rsquo;s figure out the device ID.&nbsp; This is easy because we can use a script we already wrote!</p>
<p>Go back to your open scripts in PowerShell ISE and take a look at your troubleshooting script and the $ErrorCodeList you created there.&nbsp; Comment out the hash table entries for error codes 18 and 28 and add one for error code 22 as follows:</p>
<pre class="PowerShellColorizedScript"><span style="color: #006400;">#build hashtable of Error Codes to filter for in the device list</span>            
<span style="color: #ff4500;">$ErrorCodeList</span> <span style="color: #a9a9a9;">=</span>             
<span style="color: #ff4500;">$ErrorCodeList</span><span style="color: #a9a9a9;">.</span><span style="color: #000000;">Add</span><span style="color: #000000;">(</span><span style="color: #800080;">22</span><span style="color: #a9a9a9;">,</span><span style="color: #800080;">22</span><span style="color: #000000;">)</span>            
<span style="color: #006400;">#$ErrorCodeList.Add(18,18)</span>            
<span style="color: #006400;">#$ErrorCodeList.Add(28,28)</span>            
<span style="color: #006400;">#...and so forth</span></pre>
<p>Save this script.&nbsp; Stay in the PowerShell ISE for the next steps.&nbsp; Press F5 to run the script.&nbsp; The ISE output will show you the parameters being passed through Update-DiagRootCause:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/5657.Pic20.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/5657.Pic20.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/5657.Pic20.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/5657.Pic20.png" /></a></p>
<p>One of the device parameters shown is the Device ID.&nbsp; Highlight and copy this device ID from the script output to the clipboard. &nbsp;It will likely be a long alphanumeric sequence and different from the one in the screenshot above.&nbsp; In the case above, the ID is: HDAUDIO\FUNC_01&amp;VEN_10DE&amp;DEV_000A&amp;SUBSYS_10DE0101&amp;REV_1001\5&amp;18844406&amp;0&amp;0301.&nbsp; Again, this may not be the same device as the one you disabled.</p>
<p>Go to your resolver script by clicking on the script pane button at the upper right corner next to the word &ldquo;Script&rdquo; and select the &ldquo;RS_DeviceError.ps1&rdquo; tab.&nbsp; Paste your copied Device ID where the original device ID was.&nbsp; Your switch statement will look something similar to the script below, where the [<i>Your disabled Device ID here</i>] string represents your disabled device ID.</p>
<pre class="PowerShellColorizedScript"><span style="color: #006400;">#handle each parameter passed uniquely</span>            
<span style="color: #00008b;">switch</span> <span style="color: #000000;">(</span><span style="color: #ff4500;">$ID</span><span style="color: #000000;">)</span>            
<span style="color: #000000;">{</span>            
    <span style="color: #8b0000;">"[Your disabled Device ID here]"</span>            
    <span style="color: #000000;">{</span>            
        <span style="color: #0000ff;">Get-DiagInput</span> <span style="color: #000080;">-id</span> <span style="color: #8b0000;">"INT_ShowURL0"</span>            
    <span style="color: #000000;">}</span>            
    <span style="color: #8a2be2;">default</span>            
    <span style="color: #000000;">{</span>            
        <span style="color: #0000ff;">Get-DiagInput</span> <span style="color: #000080;">-id</span> <span style="color: #8b0000;">"INT_ShowURLDefault"</span>            
    <span style="color: #000000;">}</span>            
<span style="color: #000000;">}</span></pre>
<p>Save your script and go back to Troubleshooting Pack Designer.&nbsp; Press F5 to rebuild the pack and run it.&nbsp; Once the troubleshooter hits the interaction prompt that says &ldquo;Please download and install the latest driver for this device&rdquo;, do not proceed with the troubleshooter.&nbsp; Go back to Device manager and enable the device.&nbsp; Now continue with the troubleshooter and you will see the following prompt showing that the problem was detected but not automatically fixed.&nbsp; Most importantly, it does not report &ldquo;Not Fixed&rdquo; as it did before.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/7268.Pic21.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/7268.Pic21.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/37/7268.Pic21.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-37/7268.Pic21.png" /></a></p>
<p>For the time being, this suffices for testing.&nbsp; With this sample, you have learned many things at once &ndash; the troubleshoot-resolve-verify sequence, the process of planning how a troubleshooter will handle problems, the WTP specific Update-DiagRootCause and Get-DiagInput cmdlets, creating a troubleshooting pack from scratch, and using parameters and interactions&nbsp;then adding PowerShell code to make everything work.&nbsp; Finally, you got started in learning how to be creative in testing your pack.&nbsp; That&rsquo;s quite a bit to learn in one sitting, and if you have gotten this far, congratulations!&nbsp; Next time we will improve this troubleshooting sample in a number of areas, so pat yourself on the back and get ready for the next round!</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9437/00/00/03/50/83/88/DeviceDriverExample.zip" original-url="http://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-9437-00-00-03-50-83-88/DeviceDriverExample.zip">DeviceDriverExample.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Installing Troubleshooting Pack Designer</title>
      <link>https://docs.microsoft.com/archive/blogs/justtroubleshootme/installing-troubleshooting-pack-designer</link>
      <pubDate>Tue, 10 Jul 2012 12:41:00 GMT</pubDate>
      <dc:creator><![CDATA[Ivona Kaczynski]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/justtroubleshootme/2012/07/10/installing-troubleshooting-pack-designer/</guid>
      <description><![CDATA[For all of you who might be wondering how to&nbsp;author troubleshooting packs using Windows...]]></description>
      <content:encoded><![CDATA[<p>For all of you who might be wondering how to&nbsp;author troubleshooting packs using Windows Troubleshooting Platform, you have a few options.&nbsp; One option&nbsp;is complicated and another is less so.&nbsp;&nbsp;I'll explain both as briefly as possible, with moderate&nbsp;bias on the easier one.&nbsp; Down the road we'll get into the weeds with each method of authoring and honestly when you get the hang of it, it's pretty easy.&nbsp; I guess that's how it goes with anything (riding a bike, making tomato soup like your mom made it, cleaning your room, or building a spaceship).</p>
<p><strong>Manually - a.k.a. the hard(er) way:</strong>&nbsp; You can write&nbsp;your own&nbsp;troubleshooting manifest, PowerShell scripts, and localization resources.&nbsp; The troubleshooting manifest specifies root causes that the pack can detect, calls out the scripts used to detect, resolve and verify the resolution of problems, and identifies interactions presented to the user during the troubleshooting process.&nbsp; If you want to know more, be sure to <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd323781(v=vs.85).aspx" target="_blank">read more about writing troubleshooting pack manifests on MSDN</a>.&nbsp; You will also need to <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd323709(v=vs.85).aspx" target="_blank">create and sign a security catalog, followed by creating a cab file</a>. You might want to read all of this documentation.&nbsp; Very carefully.&nbsp; Just so you can appreciate how the next method does a lot of that for you.&nbsp; Alternatively, you can skip reading and&nbsp;just go to the next method.&nbsp; Keep in mind that this is a great way to author troubleshooting packs but if you are just&nbsp;getting started it can be time consuming to learn and build.&nbsp; There are a lot of benefits to using this&nbsp;option that&nbsp;might not be&nbsp;apparent at first but will become more so as you start&nbsp;needing more flexibility in troubleshooting pack development.</p>
<p><strong>Windows Troubleshooting Pack Designer - a.k.a. the easy way:</strong>&nbsp; You can&nbsp;install a free&nbsp;GUI tool&nbsp;for editing troubleshooting packs that builds the manifest&nbsp;and&nbsp;the project file structure&nbsp;for you.&nbsp; As a bonus, you can also&nbsp;use it&nbsp;to build and sign your packs.&nbsp; Using TSP Designer makes it a lot easier to get started until you feel like setting up your own troubleshooting pack build environment.&nbsp; As you add and customize interactions like showing help text/links, asking for input&nbsp;and presenting options for the user to choose from, TSP Designer updates the manifest for you.&nbsp; Rather than dealing with troubleshooting pack framework stuff, you can focus&nbsp;more on&nbsp;the PowerShell and making sure your script&nbsp;logic detects the root cause and resolves it.&nbsp; So are you ready to try it out yet?&nbsp; Maybe you need more documentation on Windows Troubleshooting Platform to read.&nbsp; If that is the case, then read the <a href="http://msdn.microsoft.com/en-us/library/dd776530.aspx" target="_blank">Windows 7 Troubleshooting Guide</a> (which will apply to Win 8 as well).&nbsp; This can be affectionately called the WTP troubleshooting pack development manifesto.&nbsp; It is a healthy read but don't worry if it doesn't all stick at once.&nbsp; You'll get there, via teleportation or otherwise.&nbsp; Ok, let's install TSP Designer:</p>
<p>1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Install <a href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express" target="_blank">Microsoft Visual C++ 2010 Express</a> or Microsoft Visual Studio 2010<br /><br />2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Install the <a href="http://www.microsoft.com/en-us/download/details.aspx?id=8279" target="_blank">Windows 7 SDK 7.1</a> (NOTE: The &ldquo;Tools&rdquo; features under "Windows Native Code Development" and ".NET Development" must both be checked).&nbsp; This will also work with the Win 8 SDK.</p>
<p>The Troubleshooting Pack Designer can be launched by clicking Start &gt; All Programs &gt; Microsoft Windows SDK v7.1 &gt; Tools &gt; Windows Troubleshooting Pack Designer.</p>
<p><strong>****NOTE:</strong> <strong>If you are unable to launch or use the Troubleshooting Pack Designer please visit <a href="http://support.microsoft.com/kb/2644923" target="_blank">Microsoft Knowledge Base Article 2644923</a> for steps to resolve.****</strong></p>]]></content:encoded>
    </item>
    <item>
      <title>It is indeed a pleasure to introduce to you – Windows Troubleshooting Platform: Referencing Inbox Windows Troubleshooting Packs From Command Line</title>
      <link>https://docs.microsoft.com/archive/blogs/justtroubleshootme/it-is-indeed-a-pleasure-to-introduce-to-you-windows-troubleshooting-platform-referencing-inbox-windows-troubleshooting-packs-from-command-line</link>
      <pubDate>Sun, 20 May 2012 05:38:00 GMT</pubDate>
      <dc:creator><![CDATA[Ivona Kaczynski]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/justtroubleshootme/2012/05/20/it-is-indeed-a-pleasure-to-introduce-to-you-windows-troubleshooting-platform-referencing-inbox-windows-troubleshooting-packs-from-command-line/</guid>
      <description><![CDATA[Alright dudes, it&rsquo;s time to take a look at some basics.&nbsp; In the spirit of Bill and...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: small;">Alright dudes, it&rsquo;s time to take a look at some basics.&nbsp; In the spirit of Bill and Ted&rsquo;s Excellent Adventure, we will travel a bit back in time to use some pretty bodacious features in Windows 7, still totally applicable in Windows 8.&nbsp; Our travels today will not result in obtaining Genghis Khan or a totally awesome history report.&nbsp; With this information you, as <i>a most</i> <i>excellent</i> support application developer, can seriously impress your comrades as outrageously resourceful by being able to invoke a built-in Windows troubleshooting pack from your application.&nbsp; Is your customer bummed out because your app relies on internet connectivity and they&rsquo;re getting an internet connection error?&nbsp; They may be demonstrating some egregious and maybe unnecessary frustration with you, blaming your software for something that Windows can address on the spot.&nbsp; To make this simple, all you really need to do is add functionality in your application to run the Networking Troubleshooter from commandline.&nbsp; Ready to be a hero?&nbsp; It&rsquo;s time to party on with Windows Troubleshooting Platform, dudes.</span></p>
<p><span style="font-size: small;">Let&rsquo;s begin with a little terminology.&nbsp; What&rsquo;s an &ldquo;inbox troubleshooter&rdquo;?&nbsp; Well, it&rsquo;s a fancy name for a troubleshooter that&rsquo;s already part of Windows.&nbsp; Got it?&nbsp; Awesome. </span></p>
<p><span style="font-size: small;">Now, all inbox Windows troubleshooters have an attribute called a &ldquo;Troubleshooting Pack ID&rdquo; which identifies the troubleshooter so it can be invoked from the command line.&nbsp; This is most convenient if you would like to run a Windows Troubleshooting Pack from your own application.&nbsp; To accomplish this task, you can use the following command line syntax:</span></p>
<p><span style="font-size: small;">msdt&ndash;id [<i>Troubleshooting Pack ID</i>]</span></p>
<p><span style="font-size: small;">Here are some quick examples:</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><b>Audio Playback</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSDT &ndash;id AudioPlaybackDiagnostic</span><br /><span style="font-size: small;"><b>Hardware and Devices</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSDT &ndash;id DeviceDiagnostic</span><br /><span style="font-size: small;"><b>Internet Connections </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSDT &ndash;id NetworkDiagnosticsWeb</span><br /><span style="font-size: small;"><b>[Custom local diagnostic]</b>&nbsp;&nbsp; MSDT &ndash;cab [<i>Path_to_diagcab_file</i>]</span></p>
<p><span style="font-size: small;">Easy, right?&nbsp; There are lots more Troubleshooting Pack IDs you can reference at the end of this article.&nbsp; Just one moment, my most stellar developer &ndash; there&rsquo;s more you should know.&nbsp; You&rsquo;ll have this all figured out in no time, but there are a few little gotchas&hellip;</span><br /><br /><span style="font-size: medium;"><strong>Windows 7 &ldquo;Online&rdquo; Troubleshooting Packs - WOTS</strong></span></p>
<p><span style="font-size: small;">You may have heard of WOTS.&nbsp; Chances are you haven&rsquo;t.&nbsp; Well my excellent friends, WOTS stands for &ldquo;Windows Online Troubleshooting Service&rdquo;.&nbsp; Tangentially, you must first know that you absolutely can build your very own custom troubleshooting packs and run them directly from your PC of choice.&nbsp; After all, troubleshooters built with Windows Troubleshooting Platform are simply collections of scripts packaged as a .diagcab file.&nbsp; I&rsquo;ll explain all that in a different post.&nbsp; Promise.&nbsp; For now, you just need to know that WOTS is a way of hosting these packages online &ndash; when your Windows 7 machine is connected to the interwebs, it automatically downloads the online package.&nbsp; When it&rsquo;s not connected, it&rsquo;s not there.&nbsp; Got it?&nbsp; Maybe not?&nbsp; Keep reading.</span></p>
<p><span style="font-size: small;">When you&rsquo;re not online, Windows 7 gives you a particular set of troubleshooting packs.&nbsp; When you get online, you get some new or updated ones.&nbsp; In most cases, five &ldquo;online&rdquo; Troubleshooting Packs are enabled when you select the &ldquo;<i>Get the most up-to-date troubleshooters from Windows Online Troubleshooting Service</i>&rdquo; checkbox at the bottom of the <b>Control Panel&gt; All Control Panel Items</b> window as seen below: </span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/17/2543.image001.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-17/2543.image001.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/17/2543.image001.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-17/2543.image001.png" /></a></p>
<p><span style="font-size: small;">Now dudes and dudettes, these five hosted troubleshooting packs are as follows:</span></p>
<ul>
<li><span style="font-size: small;">Display Quality</span></li>
<li><span style="font-size: small;">Performance <i>(updated)</i></span></li>
<li><span style="font-size: small;">Playing and Burning CDs, DVDs, and Blu-Ray Discs</span></li>
<li><span style="font-size: small;">Set Up a TV Tuner</span></li>
<li><span style="font-size: small;">Windows Update <i>(updated)</i></span></li>
</ul>
<p><span style="font-size: small;"><i>(Hint:&nbsp; The default view in Control Panel is totally hard to read.&nbsp; If you want to see a clearer listing of the troubleshooters, click &ldquo;View All&rdquo; and you&rsquo;re have a rather nice list of them)</i></span></p>
<p><span style="font-size: small;">There&rsquo;s one additional troubleshooting pack for configuring devices (not shown in the Control Panel) that can be run by right-clicking devices under <b>Control Panel &gt; All Control Panel Items &gt; Devices and Printers:</b></span></p>
<ul>
<li><span style="font-size: small;">Device Center <i>(updated) </i>&ndash; this is a contextually launched troubleshooter that can be useful in the case of troubleshooting a specific device.&nbsp; It is totally unwise to run this troubleshooter without the parameters of the device you are troubleshooting.</span></li>
</ul>
<p><span style="font-size: small;">Of these online Troubleshooting Packs, the <b>Performance, Device Center,</b> and <b>Windows Update</b> Packs have updated versions published to WOTS by Microsoft (for reference, I put <i>(updated)</i> next to those in the list above).&nbsp; The original versions are available locally and can be launched when the computer is offline. </span></p>
<p><span style="font-size: small;"><b>Display Quality</b>, <b>Playing and Burning CDs, DVDs, and Blu-Ray Discs</b>, and <b>Set Up a TV Tuner</b>, all hosted on WOTS, are <b>not</b> available locally when the computer is offline.&nbsp; If you attempt to invoke these Troubleshooting Packs from the command line without being connected to the internet, you will see the following prompt:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/17/4213.image002.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-17/4213.image002.jpg"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/17/4213.image002.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-17/4213.image002.jpg" /></a></p>
<p><span style="font-size: small;">If you want to run the <b>Display Quality</b>, <b>Playing and Burning CDs, DVDs, and Blu-Ray Discs</b>, or <b>Set Up a TV Tuner</b> Troubleshooting Packs, you have to make sure the device is connected to the internet with WOTS enabled as shown above.</span></p>
<p><span style="font-size: small;">Does that make you dizzy?&nbsp; Wooooaaah.&nbsp; Don&rsquo;t worry.&nbsp; That&rsquo;s why I&rsquo;m writing all this down so you can reference it later when you need it, dude.&nbsp; Think of it as a little tidbit left here to remind you throughout your Circuits of Time coding travels.&nbsp;&nbsp; </span></p>
<p><strong><span style="font-size: medium;">Troubleshooting Pack IDs</span></strong></p>
<p><span style="font-size: small;">The list below shows all Windows inbox Troubleshooting packs and their respective Troubleshooting Pack IDs:</span></p>
<table style="width: 626px; height: 1120px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;"><b>Name</b></span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;"><b>Location</b></span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<div>
<p style="text-align: left;" align="center"><span style="font-size: small;"><b>Troubleshooting Pack ID</b></span></p>
</div>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Aero</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">AeroDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Connection to a Workplace Using DirectAccess</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">NetworkDiagnosticsDA</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Device Center <b><i>(invoked only in Device Center)</i></b></span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Online</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">DeviceCenterDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Display Quality</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Online</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">DisplayQualityDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Hardware and Devices</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">DeviceDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">HomeGroup</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">HomeGroupDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Incoming Connections</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">NetworkDiagnosticsInbound</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Internet Connections</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">NetworkDiagnosticsWeb</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Internet Explorer performance</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">IEBrowseWebDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Internet Explorer safety</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">IESecurityDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Network Adapter</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">NetworkDiagnosticsNetworkAdapter</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Performance</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Online</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">PerformanceDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Playing Audio</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">AudioPlaybackDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Playing and Burning CDs, DVDs, and Blu-Ray Discs</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Online</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">CDDVDDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Power</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">PowerDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Printer</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">PrinterDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Program Compatibility</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">PCWDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Recording Audio</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">AudioRecordingDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Search and Indexing</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">SearchDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Set up a TV Tuner</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Online</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">MediaCenterSetupDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Shared Folders</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">NetworkDiagnosticsFileShare</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">System Maintenance</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">MaintenanceDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Windows Media Player DVD</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">WindowsMediaPlayerDVDDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Windows Media Player Library</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">WindowsMediaPlayerLibraryDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Windows Media Player Settings</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Local</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">WindowsMediaPlayerConfigurationDiagnostic</span></p>
</td>
</tr>
<tr>
<td valign="top" width="455" nowrap="nowrap">
<p><span style="font-size: small;">Windows Update</span></p>
</td>
<td valign="top" width="114" nowrap="nowrap">
<p><span style="font-size: small;">Online</span></p>
</td>
<td valign="top" width="420" nowrap="nowrap">
<p><span style="font-size: small;">WindowsUpdateDiagnostic</span></p>
</td>
</tr>
</tbody>
</table>
<p></p>
<p><span style="font-size: small;">Awesome, huh? <i>[insert air guitar solo here]</i></span></p>
<p><strong><span style="font-size: medium;">Excellent&hellip;&hellip;But Where can I find my Troubleshooting Pack ID?</span></strong></p>
<p><span style="font-size: small;">Okay, there&rsquo;s one more thing you gotta know.&nbsp; What if you have a custom made troubleshooter on your PC and you have no idea what it is?&nbsp; Most non-triumphant.&nbsp; If for some reason you cannot locate a Troubleshooting Pack ID, you can just run the troubleshooter and step through it until it starts to detect the root cause(s).&nbsp; Try it with one of the inbox troubleshooters first.&nbsp; Go ahead and run it, then open the C:\Windows\Temp directory.&nbsp; Look for a new folder created at the time you launched the troubleshooting pack.&nbsp; This folder will have a random name, but will begin with the letters &ldquo;SDIAG_&rdquo;.&nbsp; Inside this folder, look for DiagPackage.diagpkg and open this file with a text editor (i.e. notepad).&nbsp; In the first several lines of XML, you will notice the &lt;ID&gt; tag under &lt;DiagnosticIdentification&gt;.&nbsp; This will give you the Troubleshooting Pack ID of the pack you just ran.&nbsp; See the example XML below:</span></p>
<p></p>
<p><span style="font-size: small;">&nbsp; &lt;DiagnosticIdentification&gt;</span></p>
<p><span style="font-size: small;">&nbsp;&nbsp;&nbsp; &lt;ID&gt;PerformanceDiagnostic&lt;/ID&gt;</span></p>
<p><span style="font-size: small;">&nbsp;&nbsp;&nbsp; &lt;Version&gt;1.0&lt;/Version&gt;</span></p>
<p><span style="font-size: small;">&nbsp; &lt;/DiagnosticIdentification&gt;</span></p>
<p></p>
<p><span style="font-size: small;">Next time, I&rsquo;ll tell you more about what these troubleshooting packs are all about and show you how to build them.&nbsp; For now, you are dealing with the oddity of troubleshooting with the greatest of ease and can help your customers easily avoid bogus situations by being able to code a ready-made troubleshooting pack into your application.&nbsp; Isn&rsquo;t being excellent to each other what it&rsquo;s all about?&nbsp; Later.</span></p>
<p></p>
<p><strong><span style="font-size: medium;">Supplemental Information</span></strong></p>
<ul>
<li><span style="font-size: small;">MSDN documentation on using the MSDT Command.&nbsp; Includes a list of Troubleshooting Pack IDs for launching most diagnostics: <a href="http://technet.microsoft.com/en-us/library/ee424379(WS.10).aspx">http://technet.microsoft.com/en-us/library/ee424379(WS.10).aspx</a>:</span></li>
<li><span style="font-size: small;">Additional MSDN documentation on ways to run Troubleshooting Packs: <a href="http://msdn.microsoft.com/en-us/library/dd323763(VS.85).aspx">http://msdn.microsoft.com/en-us/library/dd323763(VS.85).aspx</a>:</span></li>
<li><span style="font-size: small;">How to speak like Bill and Ted: <a href="http://www.billandted.org/howtospeak.htm">http://www.billandted.org/howtospeak.htm</a></span></li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>HeLLo DiAgnOstiCs WorLD!</title>
      <link>https://docs.microsoft.com/archive/blogs/justtroubleshootme/hello-diagnostics-world</link>
      <pubDate>Thu, 17 May 2012 12:56:00 GMT</pubDate>
      <dc:creator><![CDATA[Ivona Kaczynski]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/justtroubleshootme/2012/05/17/hello-diagnostics-world/</guid>
      <description><![CDATA[Welcome friends, to the Windows Troubleshooting Platform blog!&nbsp; This blog will serve as a...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: small;">Welcome friends, to the Windows Troubleshooting Platform blog!&nbsp; This blog will serve as a repository for how-to's and best practices to help you make the best automated diagnostics you can for your customers.&nbsp; Whether you are an OEM customer support agent/escalation engineer with some latent (and awesome) dev skills, or an application programmer concerned with the supportability of your products in Windows, this is the TechNet site for you.&nbsp; We will explore how to use Windows Troubleshooting Platform through samples and tutorials (hopefully fun ones that you can use!) and discuss cool ways Microsoft is making it easier than ever to build troubleshooting packs.&nbsp; We welcome feedback from our readers and hope that you will notice the great benefits of incorporating well built diagnotics into your software.&nbsp; Let's roll...</span></p>]]></content:encoded>
    </item>
  </channel>
</rss>