# The FQDN of the Hyper-V failover cluster (or Hyper-V host). $strHVCluster = "hvcl001.domain.local" Get-VMNetworkAdapterVlan -ComputerName $strHVCluster
# The FQDN of the Hyper-V failover cluster (or Hyper-V host). $strHVCluster = "hvcl001.domain.local" # One or more comma-separated IDs [array]$arrVlan = 110,26 # Get all network adapter VLANs from the Hyper-V Cluster that are in Access mode or where the mode is not Access/Untagged (e.g. Trunk). Get-VMNetworkAdapterVlan -ComputerName $strHVCluster | ` Where-Object {($_.OperationMode -eq "Access" -And $arrVlan -contains $_.AccessVlanId) ` -Or ($_.OperationMode -ne "Access" -And $_.OperationMode -ne "Untagged")}
$strHVHost = "Hyper-V6" $strVMName = "TEST_firewall" Get-VMNetworkAdapter -ComputerName $strHVHost -VMName $strVMName
$strHVHost = "Hyper-V6" $strVMName = "TEST_firewall" Get-VMNetworkAdapter -ComputerName $strHVHost -VMName $strVMName | ` Where-Object {$_.MacAddress -eq "00112233AABB"} | ` Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList "1-100" -NativeVlanId 1
$strHVHost = "Hyper-V6" $strVMName = "TEST_firewall" Get-VMNetworkAdapterVlan -ComputerName $strHVHost -VMName $strVMName