Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Configures the virtual LAN settings for the traffic through a virtual network adapter.
Parameter Set: VMName
Set-VMNetworkAdapterVlan [-VMName] <String[]> [-Access] [-AllowedVlanIdList <String> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-Community] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-Isolated] [-NativeVlanId <Int32]> ] [-Passthru] [-PrimaryVlanId <Int32]> ] [-Promiscuous] [-SecondaryVlanId <Int32]> ] [-SecondaryVlanIdList <String> ] [-Trunk] [-Untagged] [-VlanId <Int32]> ] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ManagementOS
Set-VMNetworkAdapterVlan -ManagementOS [-Access] [-AllowedVlanIdList <String> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-Community] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-Isolated] [-NativeVlanId <Int32]> ] [-Passthru] [-PrimaryVlanId <Int32]> ] [-Promiscuous] [-SecondaryVlanId <Int32]> ] [-SecondaryVlanIdList <String> ] [-Trunk] [-Untagged] [-VlanId <Int32]> ] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ResourceObject
Set-VMNetworkAdapterVlan [-VMNetworkAdapter] <VMNetworkAdapterBase[]> [-Access] [-AllowedVlanIdList <String> ] [-Community] [-Isolated] [-NativeVlanId <Int32]> ] [-Passthru] [-PrimaryVlanId <Int32]> ] [-Promiscuous] [-SecondaryVlanId <Int32]> ] [-SecondaryVlanIdList <String> ] [-Trunk] [-Untagged] [-VlanId <Int32]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: VMObject
Set-VMNetworkAdapterVlan [-VM] <VirtualMachine[]> [-Access] [-AllowedVlanIdList <String> ] [-Community] [-Isolated] [-NativeVlanId <Int32]> ] [-Passthru] [-PrimaryVlanId <Int32]> ] [-Promiscuous] [-SecondaryVlanId <Int32]> ] [-SecondaryVlanIdList <String> ] [-Trunk] [-Untagged] [-VlanId <Int32]> ] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
The Set-VMNetworkAdapterVlan cmdlet configures virtual LAN settings for the traffic through a virtual network adapter. Access, Trunk, Private VLAN (isolated, community, or promiscuous), and untagged are mutually exclusive.
Specifies Access mode for the virtual machine network adapter. This parameter must be specified in conjunction with parameter VlanId.
Aliase |
a |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies a list of virtual LANs allowed on a virtual machine network adapter. This parameter must be specified in conjunction with the switch parameter Trunk.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Das Cmdlet wird in einer Remotesitzung oder auf einem Remotecomputer ausgeführt. Geben Sie einen Computernamen oder ein Sitzungsobjekt ein, wie z. B. die Ausgabe eines New-CimSession oder Get-CimSession-Cmdlets. Der Standardwert ist die aktuelle Sitzung auf dem lokalen Computer.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies Community mode for the virtual machine network adapter to be configured. This parameter must be specified in conjunction with parameters PrimaryVlanId and SecondaryVlanId.
Aliase |
c |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies one or more Hyper-V hosts on which the virtual LAN settings on a virtual machine network adapter are 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.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies one or more user accounts that have permission to perform this action. The default is the current user.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies Isolated mode for the virtual machine network adapter to be configured. This parameter must be specified in conjunction with parameters PrimaryVlanId and SecondaryVlanId.
Aliase |
i |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies the management (e.g. parent or host) operating system.
Aliase |
none |
Erforderlich? |
true |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies the native virtual LAN identifier for a virtual machine network adapter. This parameter must be specified in conjunction with the switch parameter Trunk.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies that a Microsoft.HyperV.PowerShell.VMNetworkAdapterVlanSetting object is to be passed through to the pipeline representing the virtual machine network adapter virtual LAN settings to be configured.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies the primary virtual LAN identifier for a virtual network adapter in Community, Isolated, or Promiscuous mode.
This parameter must be specified in conjunction with parameter SecondaryVlanId if the virtual machine network adapter is in Community or Isolated mode. It must be used in conjunction with parameter SecondaryVlanIdList if the virtual machine network adapter is in Promiscuous mode.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies Promiscuous mode for the virtual machine network adapter.
This parameter must be specified in conjunction with parameters PrimaryVlanId and SecondaryVlanIdList.
Aliase |
p |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies the secondary virtual LAN identifier for a virtual network adapter in Community or Isolated mode.
This parameter must be specified in conjunction with parameter PrimaryVlanId, along with switch parameter Community or Isolated.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies a list of private virtual LAN secondary virtual LANs on a virtual machine network adapter.This parameter must be specified in conjunction with parameter PrimaryVlanId and switch parameter Promiscuous.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies Trunk mode for the virtual machine network adapter. This parameter must be used in conjunction with parameters AllowedVlanIdList and NativeVlanId.
Aliase |
t |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies Untagged mode for the virtual machine network adapter.
Aliase |
u |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies the virtual machine.
Aliase |
none |
Erforderlich? |
true |
Position? |
1 |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
True (ByValue) |
Platzhalterzeichen akzeptieren? |
false |
Specifies the name of the virtual machine.
Aliase |
none |
Erforderlich? |
true |
Position? |
1 |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
True (ByValue) |
Platzhalterzeichen akzeptieren? |
false |
Specifies the virtual machine network adapter.
Aliase |
none |
Erforderlich? |
true |
Position? |
1 |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
True (ByValue) |
Platzhalterzeichen akzeptieren? |
false |
Specifies the name of the virtual machine network adapter.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Specifies the virtual LAN identifier of a virtual machine network adapter. This parameter must be specified in conjunction with switch parameter Access.
Aliase |
AccessVlanId |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Fordert Sie vor der Ausführung des Cmdlet zum Bestätigen auf.
Erforderlich? |
false |
Position? |
named |
Standardwert |
false |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Zeit, was passieren würde, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Erforderlich? |
false |
Position? |
named |
Standardwert |
false |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer und -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Der Eingabetyp ist der Typ der Objekte, die Sie per Piping an das Cmdlet übergeben können.
Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.
- None by default; Microsoft.HyperV.PowerShell.VMNetworkAdapterVlanSetting if –PassThru is specified.
Sets the virtual network adapter(s) in virtual machine Redmond to the Access mode. Traffic sent by this virtual machine is tagged with VLAN ID 121.
PS C:\> Set-VMNetworkAdapterVlan –VMName Redmond –Access –VlanId 121
Sets the virtual network adapter(s) in virtual machine Redmond to the Trunk mode. Any traffic tagged with one of the VLAN IDs in the allowed VLAN list will be permitted to be sent or received by the VLAN. If traffic is untagged, it will be treated as if it were on VLAN 10.
PS C:\> Set-VMNetworkAdapterVlan -VMName Redmond -Trunk -AllowedVlanIdList 1-100 -NativeVlanId 10
Gets the virtual network adapters from virtual machine Redmond and sets them to the Private VLAN isolated mode, where primary VLAN is 10 and the secondary VLAN is 200.
PS C:\> Get-VMNetworkAdapter -VMName Redmond | Set-VMNetworkAdapterVlan -Isolated -PrimaryVlanId 10 -SecondaryVlanId 200
Gets the virtual network adapters from virtual machine WA and sets them to the Private VLAN promiscuous mode, where primary VLAN is 10 and the secondary VLANs are 201 and 202.
PS C:\> Get-VMNetworkAdapter -VMName WA | Set-VMNetworkAdapterVlan -Promiscuous -PrimaryVlanId 10 -SecondaryVlanIdList 200-201
Gets virtual machine Redmond and sets the virtual network adapters in the virtual machine to the untagged mode.
PS C:\> Get-VM Redmond | Set-VMNetworkAdapterVlan -Untagged