21 One Line PowerShell Networking Commands

Описание к видео 21 One Line PowerShell Networking Commands

Check out my Udemy course - PowerShell for Systems Engineers - exclusively on Udemy: https://www.udemy.com/course/powershe...

Check out my book, PowerShell for Systems Engineers on Amazon:
https://www.amazon.com/PowerShell-Sys...

--Retrieve the IP configuration of all network adapters.
Get-NetIPAddress

--Retrieve a list of all network interfaces and their associated IP addresses.
Get-NetIPAddress | Select-Object -Property InterfaceAlias, IPAddress | Format-Table

--Send a single ICMP echo request to a remote host.
Test-Connection -ComputerName "microsoft.com"

--Send a single ICMP echo request to a remote host while specifying counts
Test-Connection -ComputerName "microsoft.com" -Count 1

--Test if a specific port is open on a remote server.
Test-NetConnection -ComputerName "microsoft.com" -Port 80

--List all network adapters on the computer.
Get-NetAdapter

--Find MAC Address: Retrieve the MAC address of a network adapter.
Get-NetAdapter | Select-Object -Property Name, MacAddress

--Display detailed information about a specific network adapter.
Get-NetAdapter | Where-Object { $_.Name -eq "Ethernet" } | Format-Table -AutoSize

--Show network statistics for a specific network adapter.
Get-NetAdapterStatistics -Name "Ethernet"

--List open ports on your local computer.
Get-NetTCPConnection -State Listen

--Find Active Network Connections: List active network connections with local and remote endpoints.
Get-NetTCPConnection | Where-Object { $_.State -eq 'Established' }

--Show the DNS server addresses of the current network connection.
Get-DnsClientServerAddress

--Change DNS Servers: Set DNS server addresses for a network adapter.
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses ("8.8.8.8", "8.8.4.4")

--Clear the DNS resolver cache to refresh DNS information.
Clear-DnsClientCache

--Perform a trace route to a destination IP address.
Test-NetConnection -ComputerName "microsoft.com" -TraceRoute

--Retrieve the IP address associated with a domain name (A record).
Resolve-DnsName -Name "powershellengineer.com" -Type A

--Get the mail server records (MX records) for a domain.
Resolve-DnsName -Name "powershellengineer.com" -Type MX

--Resolve an IP address to its associated domain name.
[System.Net.Dns]::GetHostEntry("192.168.1.1").HostName

--Retrieve the Address Resolution Protocol (ARP) table.
Get-NetNeighbor -AddressFamily IPv4

--List all Allow firewall rules.
Get-NetFirewallRule | Where-Object { $_.Action -eq "Allow" }

--List all Allow firewall rules.
Get-NetFirewallRule | Where-Object { $_.Action -eq "Block" }


GitHub: GitHub: https://github.com/jimrtyler/
Twitter:   / jimrtyler  

Комментарии

Информация по комментариям в разработке