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

Windows for business | Windows Client for IT Pros | Storage high availability | Virtualization and Hyper-V
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.