New Question

Revision history [back]

Hello,

Once you have created your switch, which in your case does not have a AllowManagementOS set to True, you cand do something like this:

Set-VMSwitch -AllowManagementOS $True switch-name

This is to enable AllowManagementOS on the switch. Then, to enable vlan you need to use the following command:

Get-VMNetworkAdapter -SwitchName switch-name -ManagementOS | Set-VMNetworkAdapterVlan -Access -VlanId VlanID

Hello,

Once you have created your switch, which in your case does not have a AllowManagementOS set to True, you cand do something like this:

Set-VMSwitch -AllowManagementOS $True switch-name

This is to enable AllowManagementOS on the switch. Then, to enable vlan you need to use the following command:

 Get-VMNetworkAdapter -SwitchName switch-name switch-name -ManagementOS | Set-VMNetworkAdapterVlan -Access -VlanId VlanID

VlanID