Fix: Can’t Create Hyper-V 2019 Virtual Switch Error 0x80070002

When working with Microsoft’s Hyper-V 2019, system administrators occasionally encounter the frustrating error: Error 0x80070002, often displayed when attempting to create a new virtual switch. This error code indicates that the system cannot find the file specified, which can be triggered by several underlying issues related to Windows components, corruption, or misconfigured settings. This article will guide you through a series of trusted solutions to resolve this problem and restore functionality to your Hyper-V environment.

Error 0x80070002 typically appears with a message such as:

“Error applying Virtual Switch Properties changes. Cannot create the Virtual Switch. The system cannot find the file specified. (0x80070002)”

This can prevent administrators from configuring networking for their virtual machines, making it critical to identify and fix the root cause. Let’s explore the most reliable solutions.

1. Check for Missing or Corrupted System Files

Often, this error is a result of corrupted or missing system files required to manage Hyper-V network components. Using Windows built-in tools like SFC and DISM can help resolve these issues.

  1. Open Command Prompt as Administrator.
  2. Run the System File Checker:
sfc /scannow
  1. Once complete, also run the DISM tool:
DISM /Online /Cleanup-Image /RestoreHealth

After completing both scans, reboot your server and attempt to create the virtual switch again.

2. Verify the Hyper-V Services and Dependencies

If necessary services are not running, virtual switch creation may fail. Ensure the following services are enabled and running:

  • Hyper-V Virtual Machine Management
  • Network Connections
  • Network Store Interface Service

You can verify and manage these services using the services.msc console.

3. Reinstall the Hyper-V Feature

In some cases, partially installed or corrupted Hyper-V components can trigger error 0x80070002. Reinstalling the Hyper-V feature is a reliable remedy:

  1. Open Server Manager.
  2. Go to Manage > Remove Roles and Features.
  3. Uncheck Hyper-V and complete the wizard.
  4. Restart your machine.
  5. Once rebooted, repeat the process to add the Hyper-V role.

This clean reinstallation can restore missing components and resolve hidden inconsistencies.

4. Reset Network Settings and Remove Obsolete Adapters

Another potential cause lies in old or ghosted network adapters conflicting with Hyper-V’s virtual switch manager.

  1. Open Device Manager and enable the Show hidden devices option under the View menu.
  2. Expand Network Adapters and uninstall any greyed-out or duplicate adapters.

In addition, fully reset all network settings using PowerShell:

netcfg -d

This command removes all network adapters and resets the TCP/IP stack. Afterward, restart your server and reinstall any necessary network drivers before retrying the switch creation.

5. Manually Create a Virtual Switch Using PowerShell

Sometimes, the Hyper-V Manager GUI fails despite the backend functionality being intact. In such cases, a PowerShell command can bypass the issue:

New-VMSwitch -Name “ExternalSwitch” -NetAdapterName “Ethernet” -AllowManagementOS $True

Replace Ethernet with the actual name of your physical network adapter, which you can retrieve with:

Get-NetAdapter

This manual method often succeeds when the graphical interface does not.

Final Thoughts

Error 0x80070002 when creating a Hyper-V 2019 virtual switch is a common but solvable issue. Whether the cause is corrupted system files, network configuration problems, or a user interface fault in Hyper-V Manager, the solutions outlined above provide a systematic path to recovery. It is strongly recommended to back up configurations and ensure you’re working with the latest Windows updates before proceeding with system-wide changes.

If the problem persists after performing these tasks, consider checking Windows logs via Event Viewer for more specific error messages or enabling verbose logging during switch creation for deeper diagnostics.

Keeping Hyper-V operational and error-free is essential for business continuity in virtualized environments. With careful diagnosis and methodical implementation of the above steps, you can restore full functionality efficiently and securely.