Basic PowerShell Networking Commands

Windows PowerShell is a Powerful tool which is developed by Microsoft for purposes of task automation and configuration management. This is based on the .NET framework and it includes a command-line shell and a scripting language. Windows PowerShell is designed especially for the system administrators. If you are a windows administrator and if you know PowerShell very well and you can simplify and automate tedious and repetitive tasks by creating scripts and combining multiple commands together. Using PowerShell you can easily manage your computers from the command line.

PowerShell providers let you access data stores, such as the registry and system certificate stores, also you can easily access the file system. Also using PowerShell we can troubleshoot Network related problems, In windows to troubleshoot network-related problems we usually use Command prompt. Using Command prompt we can find the IP address, Public IP, Ping, Tracert, etc., Microsoft added PowerShell in windows 7, PowerShell is more powerful command-line shell and scripting language than the command prompt, It uses different commands Known as cmdlets in PowerShell. Like command prompt, we can use PowerShell for Network Troubleshooting. In this article, we are going to learn the basic PowerShell Networking Commands.

Basic PowerShell Networking Commands

Get the IP Configuration (ipconfig with PowerShell)

Get-NetIPConfiguration

List all Network Adapters

Get-NetAdapter 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.

Get-NetAdapterHardwareInfo

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 DNS Server Address information

Get-NetAdapter -Name “Local Area Connection” | Get-DnsClientServerAddress

Set IP Address

New-NetIPAddress -InterfaceAlias “Wireless” -IPv4Address 10.0.1.95 -PrefixLength “24” -DefaultGateway 10.0.1.1 

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top