Source: Thomas Maurer

Get the IP Configuration (ipconfig with PowerShell)


List all Network Adapters


Get a spesific network adapter by name

  Get-NetAdapter -Name *Ethernet*

Get more information VLAN ID, Speed, Connection status

  Get-NetAdapter | ft Name, Status, Linkspeed, VlanID

Get driver information

  Get-NetAdapter | ft Name, DriverName, DriverVersion, DriverInformation, DriverFileName

Get adapter hardware information. This can be really usefull when you need to know the PCI slot of the NIC.


Disable and Enable a Network Adapter

  Disable-NetAdapter -Name "Wireless Network Connection"   
  Enable-NetAdapter -Name "Wireless Network Connection"

Rename a Network Adapter

  Rename-NetAdapter -Name "Wireless Network Connection" -NewName "Wireless"

Get IP and DNS address information

  Get-NetAdapter -Name "Local Area Connection" | Get-NetIPAddress

Get IP address only

  (Get-NetAdapter -Name "Local Area Connection" | Get-NetIPAddress).IPv4Address

Get DNS Server Address information

  Get-NetAdapter -Name "Local Area Connection" | Get-DnsClientServerAddress

Set IP Address

  New-NetIPAddress -InterfaceAlias "Wireless" -IPv4Address -PrefixLength "24" -DefaultGateway

Change a existing IP Address

  Set-NetIPAddress -InterfaceAlias "Wireless" -IPv4Address -PrefixLength "24"

Remove IP Address

  Get-NetAdapter -Name "Wireless" | Remove-NetIPAddress

Set DNS Server

  Set-DnsClientServerAddress -InterfaceAlias "Wireless" -ServerAddresses "",""

Set interface to DHCP

  Set-NetIPInterface -InterfaceAlias "Wireless" -Dhcp Enabled

Ping with PowerShell

  Test-NetConnection -ComputerName

Get some more details from the Test-NetConnection

  Test-NetConnection -ComputerName -InformationLevel Detailed

Ping multiple IP using PowerShell

  1..99 | % { Test-NetConnection -ComputerName x.x.x.$_ } | FT -AutoSize

Tracert with PowerShell

  Test-NetConnection –TraceRoute

Portscan with PowerShell

  Test-NetConnection -ComputerName -Port 80   
  Test-NetConnection -ComputerName -CommonTCPPort HTTP

NSlookup using PowerShell:

  Resolve-DnsName -Type MX -Server

Route in PowerShell

  Get-NetRoute -Protocol Local -DestinationPrefix 192.168*   
  Get-NetRoute -InterfaceAlias Wi-Fi    
  New-NetRoute –DestinationPrefix "" –InterfaceAlias "Ethernet" –NextHop

NETSTAT in PowerShell

  Get-NetTCPConnection –State Established

Create a new NIC Teaming (Network Adapter Team)

  New-NetLbfoTeam -Name NICTEAM01 -TeamMembers Ethernet, Ethernet2 -TeamingMode SwitchIndependent -TeamNicName NICTEAM01 -LoadBalancingAlgorithm Dynamic

Get SMB Client Configuration


Get SMB Connections


Get SMB Mutlichannel Connections


Get SMB open files


Get SMB Direct (RDMA) adapters


Get and set Network Adapter VMQ settings


Disable VMQ

  Set-NetAdapterVmq -Enabled $false

Enable VMQ

  Set-NetAdapterVmq -Enabled $true

Get VM Network Adapter

  Get-VMNetworkAdapter -VMName Server01

Get VM Network Adapter IP Addresses

  (Get-VMNetworkAdapter -VMName NanoConHost01).IPAddresses

Get VM Network Adapter Mac Addresses

  (Get-VMNetworkAdapter -VMName NanoConHost01).MacAddress