This repository contains utility scripts and troubleshooting documentation for the Windows 11 and Office 365 Deployment Lab Kit.
Lab Link: Windows 11 and Office 365 Deployment Lab Kit
Master Reference Guide: For network topology diagrams, complete error registries, and step-by-step execution orders, see
LAB_REFERENCE_GUIDE.md.
| Script Name | Target System | Purpose / Problem Fixed |
|---|---|---|
fix-client-vms.ps1 |
Host PC | Fixes 0x800705B4 timeout, 0x80070020 file locks, & 0xC03A000E VHD chain errors on client & gateway VMs. |
setup-wifi-nat-switch.ps1 |
Host PC | Fixes work Wi-Fi disconnects by creating an Internal NAT Switch (192.168.16.0/24). |
configure-cm1-internet.ps1 |
CM1 VM | Configures CM1 dual-NIC with static IPs, metrics, and network-appropriate DNS. |
fix-cm1-routing.ps1 |
CM1 VM | Fixes slow internet & routing delays on dual-NIC HYD-CM1. |
disable-guest-updates.ps1 |
Guest VMs | Blocks automatic Windows Updates inside guest VMs to preserve lab baseline. |
cleanup_lab.ps1 |
Host PC | Removes all HYD-* VMs and switches for a clean reinstallation. |
When starting client VMs (HYD-CLIENT1 through HYD-Client6) after setup or reinstallation, Hyper-V throws the following initialization error:
An error occurred while attempting to start the selected virtual machine(s).
'HYD-CLIENT1' failed to start worker process: This operation returned because the timeout period expired. (0x800705B4).
- Orphaned Worker Processes & File Locks (
0x80070020): Previous failed startup attempts or setup routines leave backgroundvmwp.exeworker processes running. These processes maintain open file locks onWindowsParent.vhdxand client differencing disks inC:\Win11_25H2_Lab. - Corrupted Guest State (
.vmgs): Stale runtime state files inC:\ProgramData\Microsoft\Windows\Hyper-Vcause Hyper-V initialization to hang until the 30-second timeout.
The script fix-client-vms.ps1:
- Identifies and terminates orphaned
vmwp.exeprocesses to release file locks onWindowsParent.vhdx. - Removes corrupted/stale Hyper-V VM definitions while preserving all underlying
.VHDxdisk files. - Recreates clean Generation 2 VM definitions configured with vTPM, Dynamic Memory (2GB - 4GB), and 2 Virtual Processors, attached to
HYD-CorpNet. - Starts
HYD-CLIENT1to verify clean operation.
In an Administrator PowerShell session:
powershell -ExecutionPolicy Bypass -File .\fix-client-vms.ps1Creating a Hyper-V External Virtual Switch bound to a Wi-Fi adapter (e.g. Killer Wi-Fi 7) causes the host's Wi-Fi connection to drop instantly.
- Wi-Fi / 802.11 Protocol Restrictions: Wi-Fi networks allow only one MAC address per wireless connection. An External Switch attempts to pass multiple VM MAC addresses through the host Wi-Fi card. Corporate Wi-Fi routers (with 802.1X / MAC filtering) reject this and drop the connection.
- Bridge Driver Conflict: Hyper-V's Virtual Switch bridge filter driver causes wireless card drivers to drop association.
Use an Internal Virtual Switch + Windows NAT (Network Address Translation) instead of an External Switch.
The script setup-wifi-nat-switch.ps1:
- Configures
HYD-InterNetas an Internal Virtual Switch. - Assigns IP
192.168.16.1/24to the host's virtual interface. - Configures Windows NAT (
HYD-Lab-NAT) for subnet192.168.16.0/24. - Result: VMs route through your host's existing Wi-Fi connection using your laptop's authenticated single MAC address. Wi-Fi never drops.
In an Administrator PowerShell session:
powershell -ExecutionPolicy Bypass -File .\setup-wifi-nat-switch.ps1The HYD-CM1 VM has two active NICs:
Ethernet(corp/private network)Ethernet 2(internet/NAT network)
A stale default route on the private NIC and equal automatic interface metrics cause Windows to evaluate the wrong network path first, introducing delays for internet-bound traffic.
The script fix-cm1-routing.ps1:
- Removes the default route (
0.0.0.0/0) from the private/corp NIC (Ethernet). - Disables automatic interface metrics.
- Sets manual metrics so internet is always preferred:
Ethernet 2(internet): metric10Ethernet(corp/private): metric500
In an Administrator PowerShell session:
powershell -ExecutionPolicy Bypass -File .\fix-cm1-routing.ps1In a lab environment managed by MECM / ConfigMgr, guest VMs connected to the internet via the NAT gateway can trigger unwanted automatic Windows Updates. This consumes bandwidth, alters baseline lab configurations, and causes unexpected reboots.
The script disable-guest-updates.ps1:
- Configures Group Policy registry keys (
NoAutoUpdate = 1,AUOptions = 1,DoNotConnectToWindowsUpdateInternetLocations = 1). - Stops and disables
wuauserv(Windows Update),usoServ(Update Orchestrator),bits, anddosvc. - Disables scheduled tasks under
\Microsoft\Windows\UpdateOrchestrator\and\Microsoft\Windows\WindowsUpdate\.
In an Administrator PowerShell session inside the target guest VM:
powershell -ExecutionPolicy Bypass -File .\disable-guest-updates.ps1If you need to reinstall the lab and want to remove existing VMs and Virtual Switches to avoid conflicts, use cleanup_lab.ps1.
In an Administrator PowerShell session:
powershell -ExecutionPolicy Bypass -File .\cleanup_lab.ps1