Tuesday, December 06, 2016

Windows PowerShell Equivalents: Networking Commands (IPCONFIG)

Looking for PowerShell equivalents for older console network commands such as IPCONFIG. The IPCONFIG command is used for displaying IP address information (including the subnet mask, and gateway) for the local NIC adapter attached to the computer.

PowerShell: Get-NetIPConfiguration or Get-NetIPAddress


  • Get-NetIPConfiguration
  • Get-NetIPAddress | Sort-Object InterfaceIndex | Format-Table InterfaceIndex,InterfaceAlias,AddressFamily,IPAddress,PrefixLength -Autosize
  • Get-NetIPAddress | Where-Object AddressFamily -eq IPv6 | Format-Table –AutoSize

No comments: