How can I Add/run WindowsupdateDiagnostic tool on any target machine from pdq inventory

Completed

Comments

5 comments

  • Official comment
    Nate Blevins

    Because you can't specify a computer parameter for Get-TroubleshootingPack and because you have to first create an answer file and then point to that answer file in order run the tool silently i would suggest running this as a package as apposed to an Inventory Tool. Follow the steps below.

    Step 1:

    Create an answer file called "WUDAnswers.xml" using the following lines.

    For Windows 8/8.1 and 10

    <?xml version="1.0" encoding="UTF-8"?>
    <Answers Version="1.0">
    <Interaction ID="INT_AggressiveMode">
    <Value>1</Value>
    </Interaction>
    </Answers>

    For Windows 7

    <?xml version="1.0" encoding="UTF-8"?>
    <Answers Version="1.0" />

     

    Step 2:

    Create an package with a PowerShell step containing the following.

    Get-TroubleshootingPack -Path $env:SystemRoot\diagnostics\system\WindowsUpdate | Invoke-TroubleshootingPack -AnswerFile .\WUDAnswers.xml -Unattended -Result $env:HomeDrive\WUDResult

     

    Step 3:

    Attach the "WUDAnswers.xml" file you made earlier to the files field of the same PowerShell step you just created.

    The results of the scan should be located inside "%HOMEDRIVE%\WUDResult" (C:\WUDResult). The results aren't easy to read, but the scan does seem to work.

    You could also download and extract the "windowsupdatediagnostic" folder from the "WindowsUpdateDiagnostic.diagcab" file and point the powershell script to that, you may need to create your own answerfile using the following script.

    Get-TroubleshootingPack path\windowsupdatediagnostic -AnswerFile $env:HomeDrive\WUDAnswers.xml

     

    Comment actions Permalink
  • Nate Blevins

    Are you referring to the Windows Update Troubleshooter that is built into Windows 8/8.1 and 10 or the WindowsUpdateDiagnostic.diagcab file?

    0
    Comment actions Permalink
  • Wess Frederick

    Nate, I ran this package and it did in deed create a report :) any idea on how to read it lol.

    0
    Comment actions Permalink
  • Nate Blevins

    @Frederick, trying opening it with Internet Explorer.

    0
    Comment actions Permalink
  • Wess Frederick

    WTF lol thanks man!!!  Should have thought of that first

    0
    Comment actions Permalink

Please sign in to leave a comment.