Powershell

How to Use the Get-NetIPAddress (NetTCPIP) Cmdlet in PowerShell?

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:

Get-NetIPAddress

 

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:

Get-NetIPAddress -AddressFamily IPv6

 

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:

Get-NetIPAddress -AddressFamily IPv4

 

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:

Get-NetIPAddress | Format-Table

 

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.

About the author

Muhammad Farhan

I am a Computer Science graduate and now a technical writer who loves to provide the easiest solutions to the most difficult problems related to Windows, Linux, and Web designing. My love for Computer Science emerges every day because of its ease in our everyday life.