Set-VMSwitch

Set-VMSwitch

Configures a virtual switch.

구문

Parameter Set: SwitchName_SwitchType
Set-VMSwitch [-Name] <String[]> [-AllowManagementOS <Boolean]> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-DefaultFlowMinimumBandwidthAbsolute <Int64]> ] [-DefaultFlowMinimumBandwidthWeight <Int64]> ] [-Extensions <VMSwitchExtension[]> ] [-Notes <String> ] [-Passthru] [-SwitchType <VMSwitchType]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SwitchName_NetAdapterInterfaceDescription
Set-VMSwitch [-Name] <String[]> [-NetAdapterInterfaceDescription] <String> [-AllowManagementOS <Boolean]> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-DefaultFlowMinimumBandwidthAbsolute <Int64]> ] [-DefaultFlowMinimumBandwidthWeight <Int64]> ] [-Extensions <VMSwitchExtension[]> ] [-Notes <String> ] [-Passthru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SwitchName_NetAdapterName
Set-VMSwitch [-Name] <String[]> [-NetAdapterName] <String> [-AllowManagementOS <Boolean]> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-DefaultFlowMinimumBandwidthAbsolute <Int64]> ] [-DefaultFlowMinimumBandwidthWeight <Int64]> ] [-Extensions <VMSwitchExtension[]> ] [-Notes <String> ] [-Passthru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SwitchObject_NetAdapterInterfaceDescription
Set-VMSwitch [-VMSwitch] <VMSwitch[]> [-NetAdapterInterfaceDescription] <String> [-AllowManagementOS <Boolean]> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-DefaultFlowMinimumBandwidthAbsolute <Int64]> ] [-DefaultFlowMinimumBandwidthWeight <Int64]> ] [-Extensions <VMSwitchExtension[]> ] [-Notes <String> ] [-Passthru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SwitchObject_NetAdapterName
Set-VMSwitch [-VMSwitch] <VMSwitch[]> [-NetAdapterName] <String> [-AllowManagementOS <Boolean]> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-DefaultFlowMinimumBandwidthAbsolute <Int64]> ] [-DefaultFlowMinimumBandwidthWeight <Int64]> ] [-Extensions <VMSwitchExtension[]> ] [-Notes <String> ] [-Passthru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SwitchObject_SwitchType
Set-VMSwitch [-VMSwitch] <VMSwitch[]> [-AllowManagementOS <Boolean]> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-DefaultFlowMinimumBandwidthAbsolute <Int64]> ] [-DefaultFlowMinimumBandwidthWeight <Int64]> ] [-Extensions <VMSwitchExtension[]> ] [-Notes <String> ] [-Passthru] [-SwitchType <VMSwitchType]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

자세한 설명

The Set-VMSwitch cmdlet configures a virtual switch.

매개 변수

-AllowManagementOS<Boolean]>

Specifies whether the management operating system can use the physical network adapter that is bound to the external virtual switch.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-CimSession<Microsoft.Management.Infrastructure.CimSession[]>

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

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

true(ByPropertyName)

와일드카드 문자 허용 여부

false

-ComputerName<String[]>

Specifies one or more Hyper-V hosts on which the virtual switch is to be configured. NetBIOS names, IP addresses, and fully qualified domain names are allowable. The default is the local computer. Use localhost or a dot (.) to specify the local computer explicitly.

별칭

PSComputerName

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Credential<System.Management.Automation.PSCredential[]>

Specifies one or more user accounts that have permission to perform this action. The default is the current user.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-DefaultFlowMinimumBandwidthAbsolute<Int64]>

Specifies the minimum bandwidth, in bits per second, that is allocated to a special category called “default flow.” Any traffic sent by a virtual network adapter that is connected to this virtual switch and does not have minimum bandwidth allocated is filtered into this category. Specify a value for this parameter only if the minimum bandwidth mode on this virtual switch is absolute (See the New-VMSwitch cmdlet). By default, the virtual switch allocates 10% of the total bandwidth, which depends on the physical network adapter it binds to, to this category. For example, if a virtual switch binds to a 1 GbE network adapter, this special category can use at least 100 Mbps. If the value is not a multiple of 8, the value is rounded down to the nearest number that is a multiple of 8. For example, a value input as 1234567 is converted to 1234560.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-DefaultFlowMinimumBandwidthWeight<Int64]>

Specifies the minimum bandwidth, in relative weight, that is allocated to a special category called “default flow”. Any traffic sent by a virtual network adapter that is connected to this virtual switch and doesn’t have minimum bandwidth allocated is filtered into this category. Specify a value for this parameter only if the minimum bandwidth mode on this virtual switch is weight (See the New-VMSwitch cmdlet). By default, this special category has a weight of 1.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Extensions<VMSwitchExtension[]>

Specifies an ordered list of network extensions used to reorder the bindings on the virtual switch.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Name<String[]>

Specifies the name of the virtual switch to be configured.

별칭

SwitchName

필수 여부

true

위치

1

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Notes<String>

Specifies notes to be associated with the virtual switch.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Passthru

Specifies that a Microsoft.HyperV.PowerShell.EthernetSwitch object is to be passed through to the pipeline representing the virtual switch to be configured.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-SwitchType<VMSwitchType]>

Converts a virtual switch from one type to another. Allowed values are Internal or Private. You can convert an internal or private virtual switch to an external virtual switch, by including either the NetAdapterInterfaceDescription or NetAdapterName parameter in the command. If you do this, the external virtual switch is configured to allow the management operating system to share access to the physical network adapter. To override this behavior, include AllowManagementOs $false in the command.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-VMSwitch<VMSwitch[]>

Specifies the virtual switch to be configured.

별칭

none

필수 여부

true

위치

1

기본값

none

파이프라인 입력 허용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-NetAdapterInterfaceDescription<String>

Specifies the interface description of the physical network adapter to which an external virtual switch should be bound. If you specify this parameter to convert a virtual switch, the external virtual switch is configured to allow the management operating system to share access to the physical network adapter. To override this behavior, include AllowManagementOs $false in the command

별칭

none

필수 여부

true

위치

2

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-NetAdapterName<String>

Specifies the name of the physical network adapter to which an external virtual switch should be bound. If you specify this parameter to convert a virtual switch, the external virtual switch is configured to allow the management operating system to share access to the physical network adapter. To override this behavior, include AllowManagementOs $false in the command

별칭

InterfaceAlias

필수 여부

true

위치

2

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

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)

입력

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

출력

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

  • None by default; Microsoft.HyperV.PowerShell.EthernetSwitch if –PassThru is specified.

Example 1

This example converts a virtual switch named WA to an Internal switch.

PS C:\>  Set-VMSwitch WA –SwitchType Internal

Example 2

This example sets the minimum bandwidth allocation to 500Mbps on a virtual switch named CA for all virtual machines without explicit minimum bandwidth configuration.

PS C:\>  Set-VMSwitch CA –DefaultFlowMinimumBandwidthAbsolute 500000000