Forum Discussion

pabloh11's avatar
pabloh11
Copper Contributor
Mar 09, 2026

PS script for moving clustered VMs to another node

Windows Server 2022, Hyper-V, Failover cluster
We have a Hyper-V cluster where the hosts reboot once a month. If the host being rebooted has any number of VMs running on it the reboot can take hours. I've proven this by manually moving VM roles off of the host prior to reboot and the host reboots in less than an hour, usually around 15 minutes.

Does anyone know of a powershell script that will detect clustered VMs running on the host and move them to another host within the cluster? I'd rather not reinvent this if someone's already done it.

No RepliesBe the first to reply