This topic has not yet been rated - Rate this topic

Get-NetIPConfiguration

Applies To: Windows Server 2012

Get-NetIPConfiguration

Gets useful network information including usable interfaces, IP addresses and DNS servers.

Aliases

The following abbreviations are aliases for this cmdlet: 

  • GIP

Syntax

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

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

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

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




Detailed Description

The Get-NetIPConfiguration cmdlet gets useful network information including usable interfaces, IP addresses and DNS servers. Additional parameters show if the computer is connected to the Internet (Network Profile information), link layer address information and if DHCP is enabled.

If no parameters are specified, then this cmdlet gets IP configuration properties for all non-virtual connected interfaces on a computer.

This cmdlet does not get the prefix length, which is also known as the subnet mask. The prefix length is an addressing detail retrieved by the Get-NetIPAddress cmdlet. See the Get-NetIPAddress cmdlet for more information about retrieving the prefix length.

Parameters

-All

Indicates that the IP configuration properties for all of the interfaces on a computer are retrieved, including virtual interfaces, loopback interfaces, as well as disconnected interfaces.


Aliases

none

Required?

false

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

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Detailed

Indicates that additional interface and computer configuration information are retrieved, including 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 the alias of the interface for which to get the IP configuration properties.


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-InterfaceIndex<Int32>

Specifies the index of the interface for which to get the IP configuration properties.


Aliases

none

Required?

true

Position?

1

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

This example 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

This example uses the alias for this cmdlet. GIP 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:\> GIP

EXAMPLE 3

This example 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 4

This example gets IP configuration information. By using the Verbose parameter, the networking cmdlets are shown to gather and format the information displayed in this cmdlet. More information about how to use cmdlets in Windows PowerShell® can be learned by reading the output of this cmdlet with the Verbose parameter.


PS C:\> Get-NetIPConfiguration -Verbose

EXAMPLE 5

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


PS C:\> Get-NetIPConfiguration –InterfaceIndex 12

EXAMPLE 6

This example gets the IP address information, including PrefixLength, for the interfaces determined by this cmdlet.


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

Related topics

Get-DNSClientServerAddress

Get-NetAdapter

Get-NetIPAddress

Get-NetIPInterface

Get-NetRoute

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.