Export (0) Print
Expand All

Get-NetIPConfiguration

Windows Server 2012 R2 and Windows 8.1

Updated: October 17, 2013

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Get-NetIPConfiguration

Gets IP network configuration.

Syntax

Parameter Set: Alias
Get-NetIPConfiguration [[-InterfaceAlias] <String> ] [-CimSession <CimSession> ] [-Detailed] [ <CommonParameters>]

Parameter Set: All
Get-NetIPConfiguration -All [-CimSession <CimSession> ] [-Detailed] [ <CommonParameters>]

Parameter Set: Index
Get-NetIPConfiguration -InterfaceIndex <Int32> [-CimSession <CimSession> ] [-Detailed] [ <CommonParameters>]




Detailed Description

The Get-NetIPConfiguration cmdlet gets network configuration, including usable interfaces, IP addresses and DNS servers.

If you do not specify any parameters, this cmdlet gets IP configuration properties for all non-virtual connected interfaces on a computer.

Parameters

-All

Indicates that the cmdlet retrieves the IP configuration properties for all of the interfaces on a computer, including virtual interfaces, loopback interfaces, and disconnected interfaces.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CimSession<CimSession>

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.


Aliases

PSComputerName,ComputerName

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Detailed

Indicates that the cmdlet retrieves additional interface and computer configuration information, including the computer name, link layer address, network profile, MTU length, and DHCP status.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InterfaceAlias<String>

Specifies an alias of a network interface. The cmdlet gets an IP configuration that matches the alias.


Aliases

ifAlias

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InterfaceIndex<Int32>

Specifies an index of a network interface. The cmdlet gets an IP configuration that matches the index.


Aliases

ifIndex

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None

Examples

Example 1: Get the IP configuration

This command gets IP configuration information. When this cmdlet is run without parameters, it gets the IP configuration information for all of the non-virtual connected interfaces on the computer.


PS C:\> Get-NetIPConfiguration

Example 2: Get all IP configuration details

This command gets the IP configuration information for all of the interfaces on the computer, including virtual interfaces, loopback interfaces, and disconnected interfaces.


PS C:\> Get-NetIPConfiguration -All

Example 3: Get the IP configuration information with a common parameter

This command gets IP configuration information. By using the Verbose parameter, the networking cmdlets are shown to gather and format the information displayed in this cmdlet.


PS C:\> Get-NetIPConfiguration -Verbose

Example 4: Get the IP configuration by interface index

This command gets the IP configuration information for the interface at the index 12.


PS C:\> Get-NetIPConfiguration –InterfaceIndex 12

Example 5: Get the IP configuration from pipeline input

This command gets the IP address information, including the prefix length.


PS C:\> Get-NetIPConfiguration | Get-NetIPAddress

Related topics


Get-DNSClientServerAddress

Get-NetAdapter

Get-NetIPAddress

Get-NetIPInterface

Get-NetRoute

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft