Get-NetIPConfiguration
Get-NetIPConfiguration
Gets IP network configuration.
構文
Parameter Set: Alias
Get-NetIPConfiguration [[-InterfaceAlias] <String> ] [-AllCompartments] [-CimSession <CimSession> ] [-CompartmentId <Int32> ] [-Detailed] [ <CommonParameters>]
Parameter Set: All
Get-NetIPConfiguration -All [-AllCompartments] [-CimSession <CimSession> ] [-CompartmentId <Int32> ] [-Detailed] [ <CommonParameters>]
Parameter Set: Index
Get-NetIPConfiguration -InterfaceIndex <Int32> [-AllCompartments] [-CimSession <CimSession> ] [-CompartmentId <Int32> ] [-Detailed] [ <CommonParameters>]
詳細説明
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.
パラメーター
-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 |
IncludeAllInterfaces |
必須/オプション |
true |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
-AllCompartments
Indicates that the cmdlet gets the IP configuration properties for all of the compartments on a computer.
Aliases |
IncludeAllCompartments |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
-CimSession<CimSession>
リモート セッションまたはリモート コンピューターでコマンドレットを実行します。コンピューター名またはセッション オブジェクト (New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など) を入力します。既定値は、ローカル コンピューター上の現在のセッションです。
Aliases |
PSComputerName,ComputerName |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
True (ByPropertyName) |
ワイルドカード文字の受け入れ |
false |
-CompartmentId<Int32>
Specifies an identifier for network compartment in the protocol stack. By default, the cmdlet gets Net IP configuration in the default compartment. If you specify a value for this parameter, the cmdlet gets any matching Net IP configuration in the compartment specified in this field.
Aliases |
none |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
true(ByPropertyName) |
ワイルドカード文字の受け入れ |
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 |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
-InterfaceAlias<String>
Specifies an alias of a network interface. The cmdlet gets an IP configuration that matches the alias.
Aliases |
ifAlias |
必須/オプション |
false |
位置 |
1 |
既定値 |
none |
パイプライン入力の受け入れ |
True (ByPropertyName) |
ワイルドカード文字の受け入れ |
false |
-InterfaceIndex<Int32>
Specifies an index of a network interface. The cmdlet gets an IP configuration that matches the index.
Aliases |
ifIndex |
必須/オプション |
true |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
True (ByPropertyName) |
ワイルドカード文字の受け入れ |
false |
<CommonParameters>
このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
- None
出力
出力型は、コマンドレットが出力するオブジェクトの型です。
- None
使用例
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