Get-TroubleshootingPack C:\Windows\Diagnostics\system\WindowsUpdate -AnswerFile c:\temp\WUDAnswers.xml does not ask questions

Aravinth Mathan 326 Reputation points
2023-01-27T13:34:53.7366667+00:00

Dear Techs

I m trying to use PowerShell and automate windows update troubleshooter. The below command suppose to ask me questions to generate the answer file , but it just completes the execution as soon as i hit enter. The answer file just contains below couple of lines - which i believe is not helpful to automate the process.

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

<Answers Version="1.0"/>

Has anybody successfully generated the answer file. Any help would be much appreciated. Thanks in advance !

Aravinth M

PS C:\WINDOWS\system32> Get-TroubleshootingPack -Path C:\Windows\diagnostics\system\WindowsUpdate -AnswerFile c:\temp\WUDAnswers.xml

Please answer the following questions

You will be asked a series of questions from the specified package. The answers you provide will be stored in an answer file that you can use to automate question responses during package execution

Press enter to continue

PS C:\WINDOWS\system32>

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,621 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,413 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,535 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Paul Zwagerman 0 Reputation points
    2023-01-27T14:00:36.9433333+00:00

    Good day!

    What output do you get when you run: Get-TroubleshootingPack -Path C:\Windows\diagnostics\system\WindowsUpdate | Invoke-TroubleshootingPack ?

    Have a good day!

    0 comments No comments

  2. Paul Zwagerman 0 Reputation points
    2023-01-27T14:03:53.8533333+00:00

    Good day!

    What output do you get with :

    Get-TroubleshootingPack -Path C:\Windows\diagnostics\system\WindowsUpdate | Invoke-TroubleshootingPack

    Have a good day!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.