Q: How can I easily bulk import virtual machines into Windows Server 2012 Hyper-V?

Import VMs into Windows Server 2012 Hyper-V in a bulk operation and fulfill your IT destiny.

John Savill

May 25, 2012

1 Min Read
ITPro Today logo

A.Windows Server 2012 Hyper-V can import virtual machines (VMs) that weren't previously exported, reading in just the raw configuration XML file and performingany fix-up that's needed, automatically.

Ideally, make sure disks are in the original location and virtual networks have the same name when importing, toavoid any prompts for updated locations and network names. To import all VMs in a folder, perform the following from Windows PowerShell:

import-module hyper-v    Get-ChildItem .*.xml | import-vm | start-vm

That's it. The command will find all XML files in the folder (add -recurse to search subfolders, Get-ChildItem -Recurse .*.xml), import the VM, then startit.

See FAQs on Windows, virtualization, systems management, and all things Microsoft, at John Savill's FAQs.

About the Author(s)

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like