From 6b125346cd5b89e89d075e0bee5b2496775408fe Mon Sep 17 00:00:00 2001 From: Gabi <218829269+GabiNun2@users.noreply.github.com> Date: Wed, 3 Jun 2026 21:44:21 +0300 Subject: [PATCH] Simplify Invoke-WPFFixesNetwork.ps1 (#4594) * Update Invoke-WPFFixesNetwork.ps1 * Update Invoke-WPFFixesNetwork.ps1 --- functions/public/Invoke-WPFFixesNetwork.ps1 | 37 ++------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/functions/public/Invoke-WPFFixesNetwork.ps1 b/functions/public/Invoke-WPFFixesNetwork.ps1 index 5c3b4f87..f409130b 100644 --- a/functions/public/Invoke-WPFFixesNetwork.ps1 +++ b/functions/public/Invoke-WPFFixesNetwork.ps1 @@ -1,36 +1,5 @@ function Invoke-WPFFixesNetwork { - <# - - .SYNOPSIS - Resets various network configurations - - #> - - Write-Host "Resetting Network with netsh" - - Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" - # Reset WinSock catalog to a clean state - Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset" - - Set-WinUtilTaskbaritem -state "Normal" -value 0.35 -overlay "logo" - # Resets WinHTTP proxy setting to DIRECT - Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy" - - Set-WinUtilTaskbaritem -state "Normal" -value 0.7 -overlay "logo" - # Removes all user configured IP settings - Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset" - - Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" - - Write-Host "Process complete. Please reboot your computer." - - $ButtonType = [System.Windows.MessageBoxButton]::OK - $MessageboxTitle = "Network Reset " - $Messageboxbody = ("Stock settings loaded.`n Please reboot your computer") - $MessageIcon = [System.Windows.MessageBoxImage]::Information - - [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon) - Write-Host "==========================================" - Write-Host "-- Network Configuration has been Reset --" - Write-Host "==========================================" + netsh winsock reset + netsh int ip reset + Write-Host "Network Configuration has been Reset Please restart your computer." }