Set-NetIPInterface

Set-NetIPInterface

Modifies an IP interface.

구문

Parameter Set: ByName
Set-NetIPInterface [[-InterfaceAlias] <String[]> ] [-AddressFamily <AddressFamily[]> ] [-AdvertiseDefaultRoute <AdvertiseDefaultRoute> {Disabled | Enabled} ] [-AdvertisedRouterLifetime <TimeSpan> ] [-Advertising <Advertising> {Disabled | Enabled} ] [-AutomaticMetric <AutomaticMetric> {Disabled | Enabled} ] [-BaseReachableTimeMs <UInt32> ] [-CimSession <CimSession[]> ] [-ClampMss <Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.ClampMss> {Disabled | Enabled} ] [-CompartmentId <UInt32[]> ] [-CurrentHopLimit <UInt32> ] [-DadRetransmitTimeMs <UInt32> ] [-DadTransmits <UInt32> ] [-Dhcp <Dhcp> {Disabled | Enabled} ] [-DirectedMacWolPattern <DirectedMacWolPattern> {Disabled | Enabled} ] [-EcnMarking <EcnMarking> {Disabled | UseEct1 | UseEct0 | AppDecide} ] [-ForceArpNdWolPattern <ForceArpNdWolPattern> {Disabled | Enabled} ] [-Forwarding <Forwarding> {Disabled | Enabled} ] [-IgnoreDefaultRoutes <IgnoreDefaultRoutes> {Disabled | Enabled} ] [-IncludeAllCompartments] [-InterfaceIndex <UInt32[]> ] [-InterfaceMetric <UInt32> ] [-ManagedAddressConfiguration <ManagedAddressConfiguration> {Disabled | Enabled} ] [-NeighborDiscoverySupported <NeighborDiscoverySupported[]> ] [-NeighborUnreachabilityDetection <NeighborUnreachabilityDetection> {Disabled | Enabled} ] [-NlMtuBytes <UInt32> ] [-OtherStatefulConfiguration <OtherStatefulConfiguration> {Disabled | Enabled} ] [-PassThru] [-PolicyStore <String> ] [-ReachableTime <UInt32[]> ] [-RetransmitTimeMs <UInt32> ] [-RouterDiscovery <RouterDiscovery> {Disabled | Enabled | ControlledByDHCP} ] [-ThrottleLimit <Int32> ] [-WeakHostReceive <WeakHostReceive> {Disabled | Enabled} ] [-WeakHostSend <WeakHostSend> {Disabled | Enabled} ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]

Parameter Set: InputObject (cdxml)
Set-NetIPInterface [-AdvertiseDefaultRoute <AdvertiseDefaultRoute> {Disabled | Enabled} ] [-AdvertisedRouterLifetime <TimeSpan> ] [-Advertising <Advertising> {Disabled | Enabled} ] [-AutomaticMetric <AutomaticMetric> {Disabled | Enabled} ] [-BaseReachableTimeMs <UInt32> ] [-CimSession <CimSession[]> ] [-ClampMss <Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.ClampMss> {Disabled | Enabled} ] [-CurrentHopLimit <UInt32> ] [-DadRetransmitTimeMs <UInt32> ] [-DadTransmits <UInt32> ] [-Dhcp <Dhcp> {Disabled | Enabled} ] [-DirectedMacWolPattern <DirectedMacWolPattern> {Disabled | Enabled} ] [-EcnMarking <EcnMarking> {Disabled | UseEct1 | UseEct0 | AppDecide} ] [-ForceArpNdWolPattern <ForceArpNdWolPattern> {Disabled | Enabled} ] [-Forwarding <Forwarding> {Disabled | Enabled} ] [-IgnoreDefaultRoutes <IgnoreDefaultRoutes> {Disabled | Enabled} ] [-InterfaceMetric <UInt32> ] [-ManagedAddressConfiguration <ManagedAddressConfiguration> {Disabled | Enabled} ] [-NeighborUnreachabilityDetection <NeighborUnreachabilityDetection> {Disabled | Enabled} ] [-NlMtuBytes <UInt32> ] [-OtherStatefulConfiguration <OtherStatefulConfiguration> {Disabled | Enabled} ] [-PassThru] [-RetransmitTimeMs <UInt32> ] [-RouterDiscovery <RouterDiscovery> {Disabled | Enabled | ControlledByDHCP} ] [-ThrottleLimit <Int32> ] [-WeakHostReceive <WeakHostReceive> {Disabled | Enabled} ] [-WeakHostSend <WeakHostSend> {Disabled | Enabled} ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]

자세한 설명

The Set-NetIPInterface cmdlet modifies an IP interface, including Dynamic Host Configuration Protocol (DHCP), IPv6 neighbor discovery settings, router settings and Wake On LAN (WOL) settings.

If you do not specify any parameters, this cmdlet sets 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 modifies the IP interface that matches the families. 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- IPv4
-- IPv6

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-AdvertiseDefaultRoute<AdvertiseDefaultRoute>

Specifies the default router advertisement for an interface. This parameter value indicates whether the IP interface should advertise itself as a default router regardless of whether the node has a default route itself. This parameter is valid only for advertising interfaces. 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- Enabled
-- Disabled

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-AdvertisedRouterLifetime<TimeSpan>

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

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Advertising<Advertising>

Specifies the router advertisement value for the IP interface. 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- Enabled
-- Disabled

The default value is Disabled.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-AutomaticMetric<AutomaticMetric>

Specifies the value for 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

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-BaseReachableTimeMs<UInt32>

Specifies the base value for random reachable time, in milliseconds. For more information, see RFC 2461.
The default value is 30.

별칭

BaseReachableTime

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-CimSession<CimSession[]>

원격 세션이나 원격 컴퓨터에서 cmdlet을 실행합니다. 컴퓨터 이름이나 New-CimSession 또는 Get-CimSession cmdlet의 출력과 같은 세션 개체를 입력하세요. 기본값은 로컬 컴퓨터 상의 현재 세션입니다.

별칭

Session

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-ClampMss<Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.ClampMss>

Specifies the MSS clamping value for the IP interface. This value determines if this IP interface clamps MSS on the forwarded TCP packets that are sent out of this interface. 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- Enabled
-- Disabled

별칭

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 sets Net IP interfaces in the default compartment. If you specify a value, the cmdlet sets any matching NetIPInterface in all compartments in this field.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-CurrentHopLimit<UInt32>

Specifies a hop limit. This parameter is the value that the IP interface writes in the hop limit field for IPv6, or the Time To Live (TTL) field for IPv4, in all outbound traffic. When forwarding a packet, routers decrement the hop limit, or TTL, by 1, and discard the packet when the hop limit reaches 0. The default is defined as DefaultHopLimit in the NetIPv4Protocol and NetIPv6Protocol objects. When this parameter value is set to 0, it uses this default.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-DadRetransmitTimeMs<UInt32>

Specifies a value for the time interval between neighbor solicitation messages.

별칭

DadRetransmitTime

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-DadTransmits<UInt32>

Specifies a value for the number of consecutive messages sent while the network driver performs duplicate address detection.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Dhcp<Dhcp>

Specifies the Dynamic Host Configuration Protocol (DHCP) value for an IP interface. This setting is persistent across reboots and only stored in the active policy store. Changes to the persistent store will have no effect. 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- Enabled
-- Disabled

The default value is Enabled.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-DirectedMacWolPattern<DirectedMacWolPattern>

Specifies the wake-up packet value for an IP interface. This parameter value determines if an IP interface is configured to wake up a computer with directed MAC packet patterns. 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- Enabled
-- Disabled

The default value is Disabled.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-EcnMarking<EcnMarking>

Specifies the value 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 setting 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.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-ForceArpNdWolPattern<ForceArpNdWolPattern>

Specifies the Wake On LAN (WOL) value for the IP interface. This parameter value determines if an IP interface is configured to wake up a computer with Address Resolution Protocol (ARP) or Neighbor Discovery (ND) packet patterns. The default value is Disabled. 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- Enabled
-- Disabled

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Forwarding<Forwarding>

Specifies the packet forwarding value for the IP interface. This value determines if this IP interface forwards packets that arrive on this interface to other interfaces. 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- Enabled
-- Disabled

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-IgnoreDefaultRoutes<IgnoreDefaultRoutes>

Specifies a value for Default Route advertisements. If you enable this setting, default routes will not be dynamically added to the routing table. 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- Enabled
-- Disabled

The default value is Disabled.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-IncludeAllCompartments

Indicates that the cmdlet includes all non-default compartments.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-InterfaceAlias<String[]>

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

별칭

ifAlias

필수 여부

false

위치

1

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-InterfaceIndex<UInt32[]>

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

별칭

ifIndex

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-InterfaceMetric<UInt32>

Specifies a metric for an IP interface. 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. This parameter value uses the value generated by AutomaticMetric by default. If this parameter value is set, then the AutomaticMetric parameter is automatically disabled.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-ManagedAddressConfiguration<ManagedAddressConfiguration>

Specifies the value for managed address configuration. This parameter determines if an IP interface uses a stateful protocol, such as DHCP, to obtain an address. Setting this parameter 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

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-NeighborDiscoverySupported<NeighborDiscoverySupported[]>

Specifies an array of neighbor discovery values for the IP interface. 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- Enabled
-- Disabled

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-NeighborUnreachabilityDetection<NeighborUnreachabilityDetection>

Specifies the value for Neighbor Unreachability Detection (NUD). Use this parameter to determine when a neighbor is no longer reachable. For more information, see RFC 2461. For ActiveStore, you can modify the NUD from Disabled to Enabled, but modifying NUD from Enabled to Disabled for ActiveStore fails with an invalid parameter. For the PersistentStore, you can modify the NUD to either Enabled or Disabled, but you will have to restart the interface for the setting to take effect.

이 매개 변수에 허용되는 값은 다음과 같습니다.

-- Enabled
-- Disabled

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-NlMtuBytes<UInt32>

Specifies the network layer Maximum Transmission Unit (MTU) value, in bytes, for an IP interface. For IPv4 the minimum value is 576 bytes. For IPv6 the minimum is value is 1280 bytes. For both IPv4 and IPv6, the maximum value is 2^32-1 (4294967295). You cannot set values outside these ranges. If this parameter is set to 0, then it will remain unchanged and maintain its current value. The IP interface will not transmit packets larger than the maximum value.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-OtherStatefulConfiguration<OtherStatefulConfiguration>

Specifies the value 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 setting 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

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-PassThru

작업 중인 항목을 나타내는 개체를 반환합니다. 기본적으로 이 cmdlet은 출력을 생성하지 않습니다.

별칭

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. Specify ActiveStore only.

If you do not specify this parameter, the default entries are created in both the ActiveStore and the PersistentStore.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-ReachableTime<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.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-RetransmitTimeMs<UInt32>

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

별칭

RetransmitTime

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-RouterDiscovery<RouterDiscovery>

Specifies the value for router discovery for an IP interface, 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- ControlledByDHCP. DHCP determines if the IP Interface can be used by the computer to locate routers that reside on an attached link.
-- Disabled: IP Interface will not be used by the computer to locate routers that reside on an attached link.
-- Enabled. IP Interface can be used by the computer to locate routers that reside on an attached link.

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.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-ThrottleLimit<Int32>

Cmdlet을 실행하도록 설정할 수 있는 동시 작업의 최대 수를 지정합니다. 이 매개 변수를 생략하거나 값으로 0 을 입력하면 Windows PowerShell®은 컴퓨터에서 실행 중인 CIM cmdlet의 수에 따라 cmdlet에 대한 최적의 스로틀 제한을 계산합니다. 스로틀 제한은 현재 cmdlet에만 적용되고, 세션이나 컴퓨터에는 적용되지 않습니다.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-WeakHostReceive<WeakHostReceive>

Specifies the receive value for a weak host model. By default, 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

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-WeakHostSend<WeakHostSend>

Specifies the send value for a weak host model. By default, interface properties 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

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Confirm

cmdlet을 실행하기 전에 확인 메시지를 표시합니다.

필수 여부

false

위치

named

기본값

false

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-WhatIf

cmdlet이 실행되는 경우 발생할 결과를 보여 줍니다. cmdlet은 실행되지 않습니다.

필수 여부

false

위치

named

기본값

false

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable 등의 일반 매개 변수를 지원합니다. 자세한 내용은 TechNet의 about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216)

<WorkflowParameters>

입력

입력 형식은 cmdlet으로 파이프할 수 있는 개체의 형식입니다.

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

    Microsoft.Management.Infrastructure.CimInstance 개체는 WMI(Windows Management Instrumentation) 개체를 표시하는 래퍼 클래스입니다. 파운드 기호(#) 뒤의 경로는 기본 WMI 개체에 대한 네임 스페이스 및 클래스 이름을 제공합니다.

출력

출력 형식은 cmdlet 실행 시 출력되는 개체의 형식입니다.

  • None

Example 1: Modify an interface by the index value

This command modifies an IP interface object by using the interface index value of 12. The command also disables DHCP on the interface.

PS C:\> Set-NetIPInterface –InterfaceIndex 12 –Dhcp Disabled

Example 2: Modify the interface metrics

This command modifies all of the network adapters on the computer with a link speed of 100 Mbps and sets the interface metric on them to 21.

PS C:\> Get-NetAdapter | Where-Object –FilterScript {$_.LinkSpeed –Eq "100 Mbps"} | Set-NetIPInterface –InterfaceMetric 21

관련 항목

Get-NetAdapter

Get-NetIPInterface

Where-Object