Sep 6, 2026

Getting Started with Hyper-V on Windows Server: Installation and Your First Virtual Machine

4 min readIntermediate

If you’re already running Windows Server, Hyper-V is the fastest path to a working virtualization setup. It’s a built-in role, not a separate product to license and install, and if you’ve done any of the Windows Server work already covered on this site, the management experience will feel familiar right away.

Enabling the Hyper-V role

Via PowerShell (fastest, and scriptable for repeat deployments):

Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart

Or via Server Manager: Add Roles and Features → Server Roles → Hyper-V, follow the wizard (it will prompt you to configure virtual switches during setup, and you can also do this afterward), and reboot when prompted. A reboot is required either way since Hyper-V changes how the OS itself boots (it inserts a hypervisor layer beneath Windows itself).

Creating a virtual switch first

Before creating VMs, set up networking. This is the step people skip and then wonder why their VM has no network access:

New-VMSwitch -Name "External Switch" -NetAdapterName "Ethernet" -AllowManagementOS $true

An External switch bridges to your physical NIC (VMs get real network access, same subnet as the host). An Internal switch lets VMs talk to each other and the host but not the outside network. A Private switch isolates VMs from everything, including the host. Most first deployments want External.

Creating your first VM

New-VM -Name "TestVM01" -MemoryStartupBytes 4GB -Generation 2 `
    -NewVHDPath "D:\VMs\TestVM01\TestVM01.vhdx" -NewVHDSizeBytes 60GB `
    -SwitchName "External Switch"

Set-VMProcessor -VMName "TestVM01" -Count 2
Set-VMDvdDrive -VMName "TestVM01" -Path "D:\ISOs\WindowsServer.iso"

Start-VM -Name "TestVM01"

Generation 1 vs Generation 2 matters here and is easy to get wrong: Generation 2 supports UEFI boot, Secure Boot, and faster virtual hardware, but only works with 64-bit guest OSes that support it (Windows 8/Server 2012 and later, most modern Linux). Generation 1 is the legacy/compatibility option for older guest OSes. Pick Generation 2 unless you have a specific reason not to.

Connecting to the VM console

vmconnect.exe localhost "TestVM01"

Or through Hyper-V Manager: right-click the VM → Connect. This gives you console access to complete the guest OS install exactly as if you were sitting at physical hardware.

Day-to-day management tasks

  • Checkpoints (Hyper-V’s term for snapshots): Checkpoint-VM -Name "TestVM01" before risky changes, same discipline as VMware snapshots: not a backup strategy, and standard checkpoints accumulate differencing disks that need cleaning up.
  • Dynamic Memory: Set-VMMemory -VMName "TestVM01" -DynamicMemoryEnabled $true -MinimumBytes 1GB -MaximumBytes 8GB lets a VM’s memory allocation flex with actual usage rather than permanently reserving its maximum, genuinely useful for hosts running several lightly-used VMs.
  • Resource Metering: Enable-VMResourceMetering -VMName "TestVM01" then Measure-VM -VMName "TestVM01" for actual historical CPU/memory/network/disk usage per VM, useful for capacity planning or chargeback without extra tooling.
  • Exporting/importing a VM: Export-VM -Name "TestVM01" -Path "D:\Exports" then Import-VM on another host is the built-in way to move a VM between hosts without shared storage or live migration infrastructure.

Live Migration: what it needs that a lot of people don’t expect

Hyper-V’s live migration (moving a running VM between hosts with no downtime) doesn’t require a separate product the way VMware’s equivalent does, but it does need real infrastructure: the hosts should be part of the same domain (or configured for Kerberos constrained delegation if not), have compatible processors (or Processor Compatibility Mode enabled), and ideally shared storage (a Cluster Shared Volume or SMB share). Without shared storage, “live migration” falls back to also copying the VM’s storage over the network during the move, which works but is far slower.

Frequently asked questions

Do I need Windows Server, or does Hyper-V work on desktop Windows too?
Hyper-V is also available as an optional feature on Windows 10/11 Pro and Enterprise editions, which is genuinely useful for local dev/test VMs on a workstation. The management experience is very similar, though clustering and some enterprise features are Windows Server-only.

Is Hyper-V “good enough” compared to VMware for production use?
For the large majority of workloads, yes: Hyper-V is a mature, widely-deployed production hypervisor, not just a lab tool. The choice between the two in a given organization more often comes down to existing licensing, staff familiarity, and integration with the rest of the environment than a meaningful capability gap for typical workloads.