I recently ran into an odd issue with a new Hyper-V host server install (Server 2019). Everything on the server was working fine, but when trying to create an external virtual switch the error message below would occur: Failed to connect Ethernet switch port … The system cannot find the file specified (0x80070002).
I tried uninstalling and reinstalling Hyper-V, which did not help, manually removing the network config and setting up, also did not help, removing and re-installing the Hyper-V virtual switch protocol, which also would not work.
The solution ended up being reasonably simple. Instead of using the Microsoft default installed Intel Pro NIC drivers (in this case the X722 drivers) I downloaded the Intel driver package from the Server site (it was a standard install driver set so the one from the Intel site would have also worked) and once the Intel provided drivers instead of the Microsoft default drivers were installed it magically started working. The driver that worked in my case was Intel version 22.214.171.124.
I wasn’t able to find any good info on this specific error online, so thought i would post my eventual solution.