MS Server 2008 R2 Hyper-V help

farm8863 1 Reputation point
2021-04-08T13:46:23.287+00:00

hello,

I have a MS server 2008 R2 with Hyper V as a role with a VM that needs to allow tagged traffic from the VM through to my network. I found instruction for 2012 PowerShell commands as noted below:

however these commands don't work in 2008 R2. can you help with the commands to allow all tagged traffic through?

To see the list of adapters and assignment, use the following script:
Get-VMNetworkAdapter -VMName <C9800-name>
Note To rename the adapter name, use the following command:
Rename-VMNetworkAdapter -VMName <C9800-name> -Name '<C9800-adapter-name>' -NewName 'Eth1' Here, Eth1 is the adapter name.
To configure Ethernet1 (data port/management) as Trunk, with Native VLAN id as 0, use the following script:
Set-VMNetworkAdapterVlan -VMName “C9800” -VMNetworkAdapterName Eth1 -Trunk -AllowedVlanIdList “1-4000” -NativeVlanId 0
To configure Ethernet0 (serial port) as access or untagged, use the following script:
Set-VMNetworkAdapterVlan -VMName “C9800” -VMNetworkAdapterName Eth0 -Untagged

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
1,825 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,622 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 18,351 Reputation points Microsoft Employee
    2021-04-09T02:21:15.07+00:00

    Hi,

    The Hyper-V module for Windows PowerShell is only available since Windows Server 2012 and is not compatible with Windows Server 2008 R2.
    https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh846767(v=ws.11)

    However, there's a third-party module pshyperv that provides a PowerShell management library for Hyper-V. You may give it a try.
    https://github.com/gcbond/pshyperv

    Hope this helps.

    Best Regards,
    Ian Xue

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.