Switching primary network adapter on windows

Solution for Switching primary network adapter on windows
is Given Below:

I am writing a python script to select the network adapter that windows uses to reach the internet, for example switching from ethernet to Wi-Fi. I was wondering if there are specific powershell commands that can be used to accomplish this?