Summary
Launch Windows Powershell as an elevated process via Task Manager → Start Menu → Run → taskmgr → File → Run new Task → %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe → Select “Create this task with administrative privileges.” → Click OK.
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser -Force
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine -Force;
Get-NetAdapter | Enable-NetAdapter;
Set-NetIPInterface;
Get-DnsClient | Set-DnsClientServerAddress -ResetServerAddresses;
Get-NetAdapterBinding | Disable-NetAdapterBinding -AllBindings -IncludeHidden -componentid “ms_netbios”;
Get-NetAdapterBinding | Enable-NetAdapterBinding -componentid “ms_tcpip”;
Get-NetAdapterBinding | Enable-NetAdapterBinding -componentid “ms_tcpip6”;
Get-DnsClient | Set-DnsClientServerAddress -ResetServerAddresses;
Get-NetAdapterBinding | Disable-NetAdapterBinding -AllBindings -IncludeHidden -componentid “ms_netbios”;
Get-NetAdapterBinding | Disable-NetAdapterBinding -componentid “ms_msclient”;
Get-NetAdapterBinding | Disable-NetAdapterBinding -componentid “ms_server”;
Get-NetAdapterBinding | Disable-NetAdapterBinding -componentid “ms_pacer”;
Get-NetAdapterBinding | Disable-NetAdapterBinding -componentid “ms_implat”;
Get-NetAdapterBinding | Disable-NetAdapterBinding -componentid “ms_lldp”;
Get-NetAdapterBinding | Disable-NetAdapterBinding -componentid “ms_rspndr”;
Get-DnsClient | Set-DnsClientServerAddress -ResetServerAddresses;
Remove-Item -Path “HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Wpad” -Recurse -Force;
Set-ItemProperty -Path “HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings” -Name “DisableCachingOfSSLPages” -Value “00000000”;
Set-ItemProperty -Path “HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings” -Name “EnableNegotiate” -Value “00000000”;
Set-ItemProperty -Path “HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings” -Name “ProxyEnable” -Value “00000000”;
Set-ItemProperty -Path “HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings” -Name “MigrateProxy” -Value “00000001”;
Set-ItemProperty -Path “HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings” -Name “WarnonZoneCrossing” -Value “00000000”;
Set-ItemProperty -Path “HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings” -Name “SyncMode5” -Value “00000000”;
If you’re wondering what the above script does, it basically enables all network adapters, resets DNS addresses, enables DHCP, disables network shares / file sharing, QoS which will lag you, some other bogus stuff that in general is a big security risk for WAN networks, such as the Web Proxy Auto-Discovery (WPAD) Protocol. You might have to set the DNS address manually based on your network policy (this would be a good start, if you weren’t aware of what your default network policy is or what the settings are on your gateway / router.)
----------+++++++++±---------+++++++++±---------+++++++++±---------+++++++++±---------++++++++++
+++++++++±---------+++++++++±---------+++++++++±---------+++++++++±---------+++++++++±---------
----------+++++++++±---------+++++++++±---------+++++++++±---------+++++++++±---------++++++++++
You have to run this batch routine from an elevated command prompt. Here is a foolproof way to create an elevated command prompt → Start Menu → Run → taskmgr → File → Run new Task → %SystemRoot%\System32\CMD.EXE → Select “Create this task with administrative privileges.” → Click OK.
ipconfig /release
ipconfig /flushdns
ipconfig /renew
netsh winsock reset
netsh interface ipv4 reset
netsh interface ipv6 reset
netsh winsock reset catalog
netsh int ipv4 reset reset.log
netsh int ipv6 reset reset.log
----------+++++++++±---------+++++++++±---------+++++++++±---------+++++++++±---------++++++++++
+++++++++±---------+++++++++±---------+++++++++±---------+++++++++±---------+++++++++±---------
----------+++++++++±---------+++++++++±---------+++++++++±---------+++++++++±---------++++++++++
Netsh int ip reset says access denied (from itcrumbs . com )
"I spent hours troubleshooting this on several freshly upgraded systems running Windows 10 that couldn’t connect to the network because they couldn’t obtain an IP from the DHCP server. All machines exhibited the same issue and all machines were previously joined to a homegroup (not a domain). Here are the symptoms:
- The system is upgraded from Windows 7 to Windows 10 build 1511 and works as expected but cannot obtain an IP address via Ethernet or Wi-Fi.
- The system works normally if a static IP is assigned.
- Resetting the TCP/IP stack results in the following information:
netsh int ipv4 reset
Resetting interface, OK!
Resetting Unicast Address, OK!
Resetting Neighbor, OK!
Resetting Path, OK!
Resetting , failed.
Access is denied.Resetting , OK!
Restart the computer to complete this action
In essence having had the systems joined to a homegroup somehow messed up the TCP/IP stack in windows 10 after the upgrade to the point that the system cannot obtain an IP address from DHCP. Here’s how to fix the issue:
- Open Regedit.
- Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi and expand that folder.
- Expand the subfolder named {eb004a00-9b1a-11d4-9123-0050047759bc} and right-click the subfolder named 26. Select Permissions… and ensure that for Everyone the Full Control box is checked.
- Press WIN+X to open a command prompt with elevated permissions. Type netsh int ip reset and hit enter. Now you should see the following results:
Resetting , OK!
Restart the computer to complete this action
5.Reboot the system."