PowerShell’s “Get-NetIPAddress” cmdlet is used to get the IP address configurations of IPv4 and IPv6. Particularly, it gets the IP interfaces that are associated with the address. If the stated cmdlet gets executed without parameters, it will retrieve the entire IP address configuration. The stated cmdlet is quite useful for network administrators.
This post will reveal information about the “Get-NetIPAddress” cmdlet in PowerShell.
How to Use the Get-NetIPAddress (NetTCPIP) Cmdlet in PowerShell?
First, specify the “Get-NetIPAddress” cmdlet to get the customized IP address. Then, write the “-AddressFamily” parameter and provide the IP address, such as IPv4 or IPv6. Consider overviewing the provided examples to learn further about the discussed cmdlet.
Example 1: Use the “Get-NetIPAddress” Cmdlet to Get all the IP Configurations
To get all the IP address configurations, execute the “Get-NetIPAddress” cmdlet without parameters:
Example 2: Use the “Get-NetIPAddress” Cmdlet to Get the IPv6 Address Configuration
First, use the “Get-NetIPAddress” cmdlet. Then, add the “-AddressFamily” parameter and assign it the “IPv6” value to get the IPv6 configuration:
Example 3: Use the “Get-NetIPAddress” Cmdlet to Get the IPv4 Address Configuration
To get the IPv4 configuration, provide the “IPv4” as a value to the “-AddressFamily” parameter:
Example 4: Display the IP Configuration in the Table Format
To display the IP configurations in the table format, place the “Get-NetIPAddress” cmdlet and then pipe it to the “Format-Table” cmdlet:
That’s it! We have provided the details about the “Get-NetIPAddress” cmdlet in PowerShell.
Conclusion
To get the IP (Internet Protocol) address configuration in PowerShell, the “Get-NetIPAddress” cmdlet can be used. It gets IP address configurations IPv4 and IPv6. This blog has elaborated on PowerShell’s “Get-NetIPAddress” cmdlet.