PowerTip: Use PowerShell 3.0 to Find an IP Address

Summary: Using Windows PowerShell 3.0 on Windows 8 or Windows Server 2012 to display the IP address.

Hey, Scripting Guy! Question How can I use Windows PowerShell 3.0 on Windows 8 or Windows Server 2012 to display IP address configurations?

Hey, Scripting Guy! Answer Use the Get-NetAdapter cmdlet and filter for net adapters that have a status of up. Pipe the results to the Get-NetIPAddress cmdlet. To produce a nice output, send the results to the Format-Tablecmdlet, as shown here.

Get-NetAdapter | ? status -eq ‘up’ | Get-NetIPAddress -ea 0 | ft ipaddress, interfacealias, prefixorigin -a