ARP
1 2 3 |
Get-NetAdapter | Select-Object Name,MacAddress Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Select-Object Description,MACAddress Get-NetNeighbor |
IPCONFIG
1 2 3 4 5 |
Get-NetIPAddress Get-NetIPConfiguration Get-NetIPAddress | Sort InterfaceIndex | FT InterfaceIndex, InterfaceAlias, AddressFamily, IPAddress, PrefixLength -Autosize Get-NetIPAddress | ? AddressFamily -eq IPv4 | FT -AutoSize Get-NetAdapter Wi-Fi | Get-NetIPAddress | FT -AutoSize |
NETSH
1 2 3 |
New-NetIPAddress -InterfaceAlias Wi-Fi -IPAddress 192.168.1.56 -PrefixLength 24 -DefaultGateway 192.168.1.1 Set-NetIPAddress -InterfaceIndex 12 -IPAddress 192.168.0.16 Remove-NetIPAddress -IPAddress 192.168.0.16 -DefaultGateway 192.168.0.1 |
NETSTAT
1 2 3 4 5 |
Get-NetTCPConnection Get-NetTCPConnection | Group State, RemotePort | Sort Count | FT Count, Name -Autosize Get-NetTCPConnection | ? State -eq Established | FT -Autosize Get-NetTCPConnection | ? State -eq Established | ? RemoteAddress -notlike 127* | % { $_; Resolve-DnsName $_.RemoteAddress -type PTR -ErrorAction SilentlyContinue} Get-NetUDPEndpoint |
NSLOOKUP
1 |
Resolve-DnsName |
PING
1 2 3 4 5 |
Test-NetConnection Test-NetConnection www.jesusninoc.com Test-NetConnection -ComputerName www.jesusninoc.com -InformationLevel Detailed Test-NetConnection -ComputerName www.jesusninoc.com | Select -ExpandProperty PingReplyDetails | FT Address, Status, RoundTripTime 1..100 | % { Test-NetConnection -ComputerName www.jesusninoc.com -RemotePort 80 } | FT -AutoSize |
ROUTE
1 2 3 4 |
Get-NetRoute Get-NetAdapter Wi-Fi | Get-NetRoute New-NetRoute Remove-NetRoute |
TRACERT
1 |
Test-NetConnection -TraceRoute |