Hyper-V module: setup and commands
Documentation: Microsoft Learn
Inspect VMs with Get-VM, review checkpoints and virtual switches, and distinguish configured state from replication and runtime health.
Getting it
Comes with the Hyper-V role or the management tools feature. Enable it with Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell.
Examples
Show reference output
Show reference output
What it is for
Use it for host-side inventory, checkpoint hygiene, and replication health. It is also how a guest build gets scripted end to end, since New-VM and its companions expose every setting the console does.
Typical tasks
- Inventory VMs with state and assigned memory
- Find checkpoints older than a threshold
- Audit replication health for each VM
- List virtual switches and their type
- Check dynamic memory configuration
- Report which VMs run on which host
Check the installed version
Compare the module path and version with the session used by your scheduled task or automation account. Use it for host-side inventory, checkpoint hygiene, and replication health. It is also how a guest build gets scripted end to end, since New-VM and its companions expose every setting the console does.