This repository contains two PowerShell scripts to help Windows users quickly reset their network settings, such as renewing IP configuration and flushing DNS cache.
- Requires administrator privileges.
- Performs the following:
- Releases current IP address.
- Renews IP address via DHCP.
- Flushes DNS cache using both
ipconfig
and PowerShell native command.
- Includes elevation enforcement using
#requires -RunAsAdministrator
.
- Does not require admin rights.
- Attempts to:
- Release and renew IP address.
- Flush DNS cache using
ipconfig
. - Gracefully handle permission-limited operations.
- Ideal for use by end-users without administrative access.
powershell -ExecutionPolicy Bypass -File .\\Fix-Network.ps1
powershell -ExecutionPolicy Bypass -File .\\Fix-Network-NoAdmin.ps1
Install-Module -Name ps2exe -Scope CurrentUser
Invoke-ps2exe .\\Fix-Network.ps1 .\\Fix-Network.exe
Invoke-ps2exe .\\Fix-Network-NoAdmin.ps1 .\\Fix-Network-NoAdmin.exe
You can download the scripts directly from the repository and run them without needing to clone it.
-
Fix-Network-NoAdmin.ps1 [Preffered!]
If you're able to run the programs under your user with elevated priviledges, use Fix-Network.ps1 otherwise, use Fix-Network-NoAdmin.ps1 (preffered).
- Access download folder
- Double click on the
Fix-Network-NoAdmin.ps1
After the program run is finished, you should be able to re-connect to the network like before. Enjoy!
⚠️ Note: Running the admin version requires launching PowerShell as Administrator.