Skip to main content

NETWORKING

This section contains a variety of common network related powershell one-liners.

Disable IPv6 for all Network Adapters​

Disable-NetAdapterBinding -Name '*' -ComponentID 'ms_tcpip6'

View all network adapters IPv6 status​

Get-NetAdapterBinding | Where-Object ComponentID -EQ 'ms_tcpip6'

Example

View all network adapters status (Grid View)​

Get-NetAdapterBinding | Out-GridView

Example

Ping devices (local or remote)​

Hostname or IP can be used.
Test-NetConnection -ComputerName “google.com”
Test-NetConnection -ComputerName “10.10.132.1”

Example

Check connectivity based on port or service​

Test-NetConnection “google.com” -Port 80

Example

Perform DNS lookup​

Resolve-DnsName -Name “google.com”

Flush DNS cache​

Clear-DnsClientCache