Public/Reset-NetworkStack.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function Reset-NetworkStack {

    <#
    .DESCRIPTION
    Resets the TCP/IP and Winsock Stacks

    .Link
    Reset-NetworkAdapter
    #>


    [CmdletBinding()]
    param (
    )

    #Check For Admin Privleges
    Get-Elevation

    netsh.exe winsock reset
    netsh.exe int ip reset
    netsh.exe int ipv4 reset reset.log
    netsh.exe int ipv6 reset reset.log
    Write-Host "You need to restart the computer now"  -foregroundcolor yellow
}