List configured IP addresses
Build a paste-ready command, then review its compatibility and effects before running it.
Get-NetIPAddress | Sort-Object InterfaceAlias,AddressFamilyread-onlyno known side effects Compatibility
WindowsVerified for Windows using powershell syntax.
Operational knowledgereview due 2027-01-19
RequirementsGet-NetIPAddressGet-NetIPAddress must be installed and available on PATH.
Version supportGet-NetIPAddress Current supported releasesVerified for windows using powershell syntax; consult compatibility notes for platform-specific differences.
Expected signalsIPAddress InterfaceIndex InterfaceAlias AddressFamily PrefixLengthRepresentative successful output; values vary with the selected target and system state.
Known errorsGet-NetIPAddress: command not foundGet-NetIPAddress is missing or is not available on PATH.
VerifyGet-NetIPAddress | Sort-Object InterfaceAlias,AddressFamilyThe output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01Get-NetIPAddressCommandRuns the Get-NetIPAddress stage of this one-liner.
02|PipelinePasses the output on the left to the command on the right.
03Sort-ObjectCommandRuns the Sort-Object stage of this one-liner.
04InterfaceAlias,AddressFamilyArgumentPasses InterfaceAlias,AddressFamily to Sort-Object.
Example input
Get-NetIPAddress | Sort-Object InterfaceAlias,AddressFamily
Example output
IPAddress InterfaceIndex InterfaceAlias AddressFamily PrefixLength
--------- -------------- -------------- ------------- ------------
192.168.1.42 12 Ethernet IPv4 24
fe80::a00:27ff:fe4e:66a1%12 12 Ethernet IPv6 64
Illustrative output — exact values vary by system and data.
Runbooks
Official sources