Here is a second in a series of articles on using PowerShell I would suggest for the beginner use PowerShell ISE this will help you with the commands. We cover IP configuration in this article.
Some Commands that you can use in PowerShell are;
Get-NetAdapter
Restart-NetAdapter
Get-NetIPInterface
Get-NetIPAddress
Get-NetRoute
Get-NetConnectionProfile
Get-DNSClientCache
Get-DNSClientServerAddress
Register-DnsClient
Set-DnsClient
Set-DnsClientGlobalSetting
Set-DnsClientServerAddress
Set‑NetIPAddress
Set‑NetIPv4Protocol
Set‑NetIPInterface
Test-Connection
Test-NetConnection
Resolve-Dnsname
By knowing this we can use this to do IPv4 Troubleshooting Process, we could use the old command line tools, but with PowerShell we can save results and pipe some commands. For example;
Step |
Windows PowerShell |
Command-line tool |
Verify the network configuration is correct |
Get-NetIPAddress |
ipconfig |
Identify the network path between hosts |
Test-NetConnection -TraceRoute |
tracert |
See if the remote host responds |
Test-NetConnection |
ping |
Test the service on a remote host |
Test-NetConnection -Port |
Telnet |
See if the default gateway responds |
Test-NetConnection |
ping |