winutil/functions/public/Invoke-WPFFixesNetwork.ps1
2023-10-04 10:08:10 -05:00

25 lines
956 B
PowerShell

function Invoke-WPFFixesNetwork {
<#
.DESCRIPTION
PlaceHolder
#>
Write-Host "Resetting Network with netsh"
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset"
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy"
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset"
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 "-- Reset Network Configuration --"
Write-Host "================================="
}