I am trying to use Get-Troubleshooting pack in Windows 2016 to create an answer file to allow me to automate one particular fix.
If I do this:
$TSPackfolders = Get-ChildItem -Path C:\Windows\diagnostics\system -Directory
# get answer files
$TSPacks = foreach ($TSPack in $TSPackfolders) {
Get-TroubleshootingPack -Path $TSPack.FullName}
# Start a troubleshooting pack
$TsPack = $TSPacks | Where id -eq 'WindowsUpdateDiagnostic'
$TsPack | Invoke-TroubleshootingPack
Get-TroubleshootingPack -Path $TSPack.path `
-AnswerFile c:\Answers.xml
But when I do this, I don't manage to actually go through the same questions as when running the troubleshooter natively.
Also when I run the TSPack using the answer file, nothing is automated?
Does using the cmdlet actually property create the answer file?
Thomas Lee <DoctorDNS@Gmail.Com>