Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Problems using Get-TroubleshootingPack

$
0
0

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
$TSPacks = foreach ($TSPack in $TSPackfolders) {
              Get-TroubleshootingPack -Path $TSPack.FullName}
# Start a troubleshooting pack
$TsPack = $TSPacks | Where id -eq 'WindowsUpdateDiagnostic'
$TsPack | Invoke-TroubleshootingPack

# get answer files
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>




Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>