Worklet: Invoke Troubleshootingpack Networking

  • 11 October 2019
  • 0 replies
  • 35 views

Userlevel 5

Invokes Microsoft’s builtin network repairs. Edit the variable $logfile to set a custom log file locatiom. Only run manually and test thoroughly beforehand.

• Under Evaluation Code:


If (Test-Path "$env:allusersprofile\SoftwareDistribution")
{
Exit 0

}
Else {
Exit 1
}

• Under Remediation Code:


$logfile = "C:\Temp\"

Get-TroubleshootingPack -path "C:\Windows\Diagnostics\System\networking" | Invoke-TroubleshootingPack -Unattended -Result "$logfile"

0 replies

Be the first to reply!

Reply