How to access/modify which switches/ethernets apply to a given Network Bridge via Powershell?

hippocalypse 0 Reputation points
2024-07-28T02:01:02.9066667+00:00

I am trying to find out how to access/modify which switches/ethernets apply to a given Network Bridge via powershell.Screenshot (2).png

FYI, I'm running windows 10 and have multiple website vm's on hyper-v that are routed through a reverse proxy vm.

The reason I am trying to mutate these values via powershell is because I have to re-enable the 'vEthernet (Default Switch)' on the network bridge after every reboot.

Thanks for any possible input and help you may have for me!

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,595 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 46,811 Reputation points
    2024-07-28T15:48:51.3833333+00:00

    I don't think PowerShell is going to be able to help you with this, other than acting as a shell for command line programs.

    netsh may be what you need: https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-bridge

    Others have tried managing a bridge with PowerShell but I don't think any have succeeded: https://stackoverflow.com/questions/48557190/create-a-network-bridge-between-two-network-adaptors

    0 comments No comments

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.