PowerShell: 批量导入Hyper-V虚拟机
前提条件
本文所介绍的方法要求以下目录保持原有的相对关系、目录结构及所在盘符不能改变。
Virtual Machines
Snapshots
VHD文件夹(可以是多个)
导入方法
path = 'D:\Hyper-V\Virtual Machines'
# Get the VM configuration files
Get-ChildItempath -Recurse -Filter *.vmcx
# Check VM import / register
Get-ChildItem path -Recurse... [阅读全文]