Bulk import virtual machine in hyper-v, import virtual machine all at one step


Get-ChildItem e:\virtuals | Where-Object { $_.Attributes -band [System.IO.FileAttributes]::Directory } | ForEach-Object {Import-VM -path $_.FullName -ReuseIDs -Wait}


You must have module for hyper-v for powershell… dowload it from this location  http://pshyperv.codeplex.com/releases


dpejic has written 85 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>