Get-NetIPInterface

Get-NetIPInterface

Gets an IP interface.

構文

Parameter Set: ByName
Get-NetIPInterface [[-InterfaceAlias] <String[]> ] [-AddressFamily <AddressFamily[]> ] [-AdvertiseDefaultRoute <AdvertiseDefaultRoute[]> ] [-AdvertisedRouterLifetime <TimeSpan[]> ] [-Advertising <Advertising[]> ] [-AutomaticMetric <AutomaticMetric[]> ] [-BaseReachableTimeMs <UInt32[]> ] [-CimSession <CimSession[]> ] [-ClampMss <ClampMss[]> ] [-CompartmentId <UInt32[]> ] [-ConnectionState <ConnectionState[]> ] [-CurrentHopLimit <UInt32[]> ] [-DadRetransmitTimeMs <UInt32[]> ] [-DadTransmits <UInt32[]> ] [-Dhcp <Dhcp[]> ] [-DirectedMacWolPattern <DirectedMacWolPattern[]> ] [-EcnMarking <EcnMarking[]> ] [-ForceArpNdWolPattern <ForceArpNdWolPattern[]> ] [-Forwarding <Forwarding[]> ] [-IgnoreDefaultRoutes <IgnoreDefaultRoutes[]> ] [-IncludeAllCompartments] [-InterfaceIndex <UInt32[]> ] [-InterfaceMetric <UInt32[]> ] [-ManagedAddressConfiguration <ManagedAddressConfiguration[]> ] [-NeighborDiscoverySupported <NeighborDiscoverySupported[]> ] [-NeighborUnreachabilityDetection <NeighborUnreachabilityDetection[]> ] [-NlMtuBytes <UInt32[]> ] [-OtherStatefulConfiguration <OtherStatefulConfiguration[]> ] [-PolicyStore <String> ] [-ReachableTimeMs <UInt32[]> ] [-RetransmitTimeMs <UInt32[]> ] [-RouterDiscovery <RouterDiscovery[]> ] [-ThrottleLimit <Int32> ] [-WeakHostReceive <WeakHostReceive[]> ] [-WeakHostSend <WeakHostSend[]> ] [ <CommonParameters>] [ <WorkflowParameters>]

Parameter Set: ByAdapter
Get-NetIPInterface [-AssociatedAdapter <CimInstance> ] [-CimSession <CimSession[]> ] [-IncludeAllCompartments] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]

Parameter Set: ByIPAddress
Get-NetIPInterface [-AssociatedIPAddress <CimInstance> ] [-CimSession <CimSession[]> ] [-IncludeAllCompartments] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]

Parameter Set: ByNeighbor
Get-NetIPInterface [-AssociatedNeighbor <CimInstance> ] [-CimSession <CimSession[]> ] [-IncludeAllCompartments] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]

Parameter Set: ByRoute
Get-NetIPInterface [-AssociatedRoute <CimInstance> ] [-CimSession <CimSession[]> ] [-IncludeAllCompartments] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]

詳細説明

The Get-NetIPInterface cmdlet gets an IP interface, including IPv4 and IPv6 addresses, and the associated address configuration for the IP interfaces. Without parameters, this cmdlet gets all of the IP interface properties on the computer, including virtual interfaces and loopback interfaces.

パラメーター

-AddressFamily<AddressFamily[]>

Specifies an array of IP address families. The cmdlet gets the IP interface that matches the address families. このパラメーターに指定できる値は、次のとおりです。

-- IPv4
-- IPv6

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-AdvertiseDefaultRoute<AdvertiseDefaultRoute[]>

Specifies an array of default router advertisement values for an IP interface. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-AdvertisedRouterLifetime<TimeSpan[]>

Specifies an array of lifetimes, as TimeSpan objects, for default routes. This parameter indicates the lifetime of default routes when advertising routes on the IP interface. The default value is 1800. Valid only for advertising interfaces. To obtain a TimeSpan object, use the New-TimeSpan cmdlet.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Advertising<Advertising[]>

Specifies an array of router advertisement values for the IP interface. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

The default value is Disabled.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-AssociatedAdapter<CimInstance>

Specifies a network adapter as a CIM object.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByValue)

ワイルドカード文字の受け入れ

false

-AssociatedIPAddress<CimInstance>

Specifies a network IP address as a CIM object. To obtain an IP address object, use the Get-NetIPAddress cmdlet.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByValue)

ワイルドカード文字の受け入れ

false

-AssociatedNeighbor<CimInstance>

Specifies a network neighbor as a CIM object. To obtain a neighbor object, use the Get-NetNeighbor cmdlet.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByValue)

ワイルドカード文字の受け入れ

false

-AssociatedRoute<CimInstance>

Specifies a network route as a CIM object. To obtain a route object, use the Get-NetRoute cmdlet.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByValue)

ワイルドカード文字の受け入れ

false

-AutomaticMetric<AutomaticMetric[]>

Specifies an array of values for the automatic metric calculation. Automatic metric determines whether TCP/IP automatically calculates a value for an interface metric that is based on the speed of the interface. The fastest interface has the lowest interface metric value. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-BaseReachableTimeMs<UInt32[]>

Specifies an array of base values of random reachable times, in milliseconds. For more information, see RFC 2461. The default value is 30.

Aliases

BaseReachableTime

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。コンピューター名またはセッション オブジェクト (New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など) を入力します。既定値は、ローカル コンピューター上の現在のセッションです。

Aliases

Session

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-ClampMss<ClampMss[]>

Specifies an array of MSS clamping values for IP interface. This value determines if the IP interface clamps MSS on the forwarded TCP packets that are sent out of the interface. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-CompartmentId<UInt32[]>

Specifies an array of identifiers for network compartments in the protocol stack. By default, the cmdlet only gets Net IP interfaces in the default compartment. If you specify a value, the cmdlet gets any matching NetIPInterface in all compartments in this field.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-ConnectionState<ConnectionState[]>

Specifies an array of connection states for interfaces that are physically connected to a network.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-CurrentHopLimit<UInt32[]>

Specifies an array of hop limits. This parameter is the value that the IP interface writes in the hop limit for IPv6, or the Time To Live (TTL) field, for IPv4, in all outbound traffic. When forwarding a packet, routers must decrement the hop limit, or TTL, by 1, and discard the packet when the hop limit reaches 0.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-DadRetransmitTimeMs<UInt32[]>

Specifies an array of values for the time interval between neighbor solicitation messages.

Aliases

DadRetransmitTime

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-DadTransmits<UInt32[]>

Specifies an array of values for the number of consecutive messages sent while the network driver performs duplicate address detection.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Dhcp<Dhcp[]>

Specifies the DHCP value for an IP interface. This value is persistent across reboots and only stored in the active policy store.
このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

The default value is Enabled.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-DirectedMacWolPattern<DirectedMacWolPattern[]>

Specifies an array of values for the wake-up packet for an IP interface. This parameter determines if an IP interface is configured to wake up a computer with directed MAC packet patterns. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

The default value is Disabled.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-EcnMarking<EcnMarking[]>

Specifies an array of values for Explicit Congestion Notification (ECN) marking. This parameter value controls the specific ECN marking in the ECN field of the IP header. このパラメーターに指定できる値は、次のとおりです。

-- AppDecide. Allow an application or higher layer protocol, such as TCP, to decide how to apply ECN marking. In order for an application to fully control ECN capability value in the Network TCP value must also be set to enabled.
-- Disabled. Disable the ECN marking on the IP interface.
-- UseEct0. Mark all of the egress IP packets on the IP interface with the Ect0 bit set.
-- UseEct1. Mark all of the egress IP packets on the IP interface with the Ect1 bit set.

The default value is AppDecide.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-ForceArpNdWolPattern<ForceArpNdWolPattern[]>

Specifies an array of Wake On LAN (WOL) values for the IP interface. This parameter determines if an IP interface is configured to wake up a computer with Address Resolution Protocol (ARP) and Neighbor Discovery (ND) packet patterns. By default, IP interface properties have ForceArpNdWolPattern set to disabled. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Forwarding<Forwarding[]>

Specifies an array of packet forwarding values for the IP interface. This value determines if this IP interface forwards packets that arrive on this interface to other interfaces. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-IgnoreDefaultRoutes<IgnoreDefaultRoutes[]>

Specifies an array of values for default route advertisements. If you enable this value, default routes will not be dynamically added to the routing table. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

The default value is Disabled.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-IncludeAllCompartments

Indicates that the cmdlet includes all non-default compartments.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-InterfaceAlias<String[]>

Specifies an array of aliases of network interfaces. The cmdlet gets IP interfaces that match the aliases.

Aliases

ifAlias

必須/オプション

false

位置

1

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-InterfaceIndex<UInt32[]>

Specifies an array of indexes of network interfaces. The cmdlet gets IP interfaces that match the indexes.

Aliases

ifIndex

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-InterfaceMetric<UInt32[]>

Specifies an array of metrics of IP interfaces. When routes are chosen, the overall metric used to determine the preference is the sum of the route metric and the interface metric. Typically, the interface metric gives preference to a particular interface, such as using wired if both wired and wireless are available. The default value is automatic.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-ManagedAddressConfiguration<ManagedAddressConfiguration[]>

Specifies an array of values of managed address configurations. This parameter determines if an IP interface uses a stateful protocol, such as DHCP, to obtain an address. Setting this parameter will have no effect on an interface that has router discovery enabled and advertising disabled. In that case, the parameter is controlled by router discovery. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-NeighborDiscoverySupported<NeighborDiscoverySupported[]>

Specifies an array of neighbor discovery values for the IP interface. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-NeighborUnreachabilityDetection<NeighborUnreachabilityDetection[]>

Specifies an array of values for Neighbor Unreachability Detection (NUD). Use this parameter to determine when a neighbor is no longer reachable. For more information, see RFC 2461. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-NlMtuBytes<UInt32[]>

Specifies an array of network layer Maximum Transmission Unit (MTU) values, in bytes, for an IP interface. The IP interface will not transmit packets larger than the maximum value.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-OtherStatefulConfiguration<OtherStatefulConfiguration[]>

Specifies an array of values for configuration other than addresses. This parameter determines if an IP interface uses a stateful protocol, such as DHCP, to obtain configuration information other than addresses. This parameter value has no effect on an interface that has router discovery enabled and advertising disabled. In that case, the parameter is controlled by router discovery. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-PolicyStore<String>

Specifies a PolicyStore value. このパラメーターに指定できる値は、次のとおりです。

-- ActiveStore. The IP address information is valid.
-- PersistentStore. The computer saves IP address information across restarts. When the computer restarts, it copies the saved settings to the ActiveStore.

The default value is ActiveStore.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-ReachableTimeMs<UInt32[]>

Specifies an array of reachable time values. This parameter is the time, in milliseconds, that a node assumes that a neighbor is reachable after having received a reachability confirmation. This parameter works with the NeighborUnreachabilityDetection parameter.

Aliases

ReachableTime

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-RetransmitTimeMs<UInt32[]>

Specifies an array of value for timeout and retransmission, in milliseconds, for Neighbor Solicitation messages. For more information, see RetransTimer in RFC 2461. By default, the value is 1000.

Aliases

RetransmitTime

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-RouterDiscovery<RouterDiscovery[]>

Specifies the value for router discovery for an IP interface. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled
-- ControlledByDHCP. IP Interface properties for interfaces that have RouterDiscovery controlled by Dynamic Host Configuration Protocol (DHCP).

By default, the value of this parameter is ControlledByDHCP for IPv4 and Enabled for IPv6. If the value of this parameter is enabled, an IP host can locate routers that reside on an attached link.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-ThrottleLimit<Int32>

コマンドレットを実行する際に確立できる同時実行操作の最大数を指定します。このパラメーターを省略するか、値 0 を入力した場合、コンピューター上で実行されている CIM コマンドレットの数に基づいて、コマンドレットに最適なスロットル制限が Windows PowerShell® によって計算されます。スロットル制限は、セッションやコンピューターではなく、現在のコマンドレットにのみ適用されます。

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-WeakHostReceive<WeakHostReceive[]>

Specifies the receive value for a weak host model. By default, an IP interface properties set this parameter to disabled. If this parameter is enabled, an IP host can receive IP packets on an interface that is not assigned the destination IP address of the packet being received. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-WeakHostSend<WeakHostSend[]>

Specifies the send value for a weak host model. By default, an IP interface set this parameter to disabled. If this parameter is enabled, an IP host can send IP packets on an interface that is not assigned the destination IP address of the packet being sent. このパラメーターに指定できる値は、次のとおりです。

-- Enabled
-- Disabled

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

<WorkflowParameters>

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • None

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

  • Microsoft.Management.Infrastructure.CimInstance#root\StandardCimv2\MSFT_NetIPInterface

    Microsoft.Management.Infrastructure.CimInstance オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。基になる WMI オブジェクトの名前空間とクラス名は、シャープ記号 (#) に続くパスで指定されます。

使用例

Example 1: Get IP interface configuration

This command gets the IP interface configuration on the computer on which you run the cmdlet.

PS C:\> Get-NetIPInterface

Example 2: Get IP interface information for IPv6 addresses

This command gets information about the IP interface configuration for all IP interfaces for which you have configured IPv6 addresses.

PS C:\> Get-NetIPInterface –AddressFamily IPv6

Example 3: Get IP interface information and format the output

This command gets information about IP interface configuration, and displays that information in a table.

PS C:\> Get-NetIPInterface | Format-Table

Example 4: Get IP interface information by interface index

This command gets information about the IP interface configuration for a specific interface index.

PS C:\> Get-NetIPInterface –InterfaceIndex 12

Example 5: Get and sort IP interface information

This command gets information about IP address configuration, sorts them numerically by the interface index in the cmdlet name, and then displays them in a table format.

PS C:\> Get-NetIPInterface | Sort-Object –Property InterfaceIndex | Format-Table

Example 6: Get the IP interface by specifying the router lifetime

This command gets information about IP address configuration for all IP interfaces that have a default AdvertisedRouterLifetime.

PS C:\> Get-NetIPInterface | Where-Object -FilterScript { $_.AdvertisedRouterLifetime.TotalSeconds -Eq 1800 }

関連項目

Format-List

Format-Table

Get-NetRoute

Set-NetIPInterface

Sort-Object

Where-Object