The Get-NetIPInterface PowerShell command is a powerful tool for managing network interfaces on Windows systems. It can be used to query, configure, and manage network interfaces, such as Ethernet, Wi-Fi, and other types of network connections. This command is part of the NetTCPIP module, which is included in Windows PowerShell 5.1 and later.
The Get-NetIPInterface command is a great way to quickly view and manage network interfaces on Windows systems. It can be used to query information about existing network interfaces, as well as to configure and manage them. This article will explain the syntax, parameters, inputs, outputs, examples, and tips for using the Get-NetIPInterface command.
Syntax
The syntax for the Get-NetIPInterface command is as follows:
Get-NetIPInterface [-InterfaceAlias] <String[]> [-AddressFamily <AddressFamily[]>] [-CimSession <CimSession[]>] [-Dhcp <Boolean>] [-IPv4Address <String[]>] [-IPv6Address <String[]>] [-MacAddress <String[]>] [-Name <String[]>] [-PhysicalAddress <String[]>] [-ScopeId <String[]>] [-ThrottleLimit <Int32>] [-AsJob] [-CimClass <String>] [-ComputerName <String[]>] [-Namespace <String>] [-PassThru] [-Authentication <AuthenticationLevel>] [-CertificateThumbprint <String>] [-Impersonation <ImpersonationLevel>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-Sddl <String>] [-UserName <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
The Get-NetIPInterface command has several parameters that can be used to customize the output. The table below outlines the parameters and their descriptions:
Parameter | Description |
---|---|
-InterfaceAlias | Specifies the alias of the network interface. |
-AddressFamily | Specifies the address family of the network interface. |
-CimSession | Specifies the CimSession object to use for the command. |
-Dhcp | Specifies whether the network interface is using DHCP. |
-IPv4Address | Specifies the IPv4 address of the network interface. |
-IPv6Address | Specifies the IPv6 address of the network interface. |
-MacAddress | Specifies the MAC address of the network interface. |
-Name | Specifies the name of the network interface. |
-PhysicalAddress | Specifies the physical address of the network interface. |
-ScopeId | Specifies the scope ID of the network interface. |
-ThrottleLimit | Specifies the throttle limit for the command. |
-AsJob | Runs the command as a background job. |
-CimClass | Specifies the CIM class to use for the command. |
-ComputerName | Specifies the computer name to use for the command. |
-Namespace | Specifies the namespace to use for the command. |
-PassThru | Returns an object representing the item with which you are working. |
-Authentication | Specifies the authentication level to use for the command. |
-CertificateThumbprint | Specifies the certificate thumbprint to use for the command. |
-Impersonation | Specifies the impersonation level to use for the command. |
-InformationAction | Specifies how the command should process data. |
-InformationVariable | Specifies an information variable to use for the command. |
-Sddl | Specifies the SDDL string to use for the command. |
-UserName | Specifies the user name to use for the command. |
-WhatIf | Shows what would happen if the command were to run. |
-Confirm | Prompts you for confirmation before running the command. |
Inputs
The Get-NetIPInterface command does not accept any inputs.
Outputs
The Get-NetIPInterface command returns an object representing the network interface. The object contains information about the interface, such as its name, address, and MAC address.
Examples
The following examples show how to use the Get-NetIPInterface command:
- To view information about all network interfaces on the local computer, run the following command: Get-NetIPInterface
- To view information about a specific network interface, run the following command: Get-NetIPInterface -Name “Ethernet”
- To view information about a network interface with a specific IPv4 address, run the following command: Get-NetIPInterface -IPv4Address “192.168.1.1”
- To view information about a network interface with a specific MAC address, run the following command: Get-NetIPInterface -MacAddress “00-00-00-00-00-00”
Tips
The following tips can help you get the most out of the Get-NetIPInterface command:
- Use the -Name parameter to specify the name of the network interface.
- Use the -IPv4Address parameter to specify the IPv4 address of the network interface.
- Use the