mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-06 06:38:31 +00:00
* updated theme to the latest version * Update en.yaml * removed all the order from the docs * add the store link * update homepage * add filename and line number to all the code blocks and also removed pages * auto pull the code from the json files * Merge branch 'main' into winutil-new-features * the script updated linenostart= * Delete LaptopHibernation.md
43 lines
1.5 KiB
Markdown
43 lines
1.5 KiB
Markdown
---
|
|
title: "Reset Network"
|
|
description: ""
|
|
---
|
|
```powershell {filename="functions/public/Invoke-WPFFixesNetwork.ps1",linenos=inline,linenostart=1}
|
|
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 "=========================================="
|
|
}
|
|
```
|