Storage Migration + PowerShell + Windows “8” = Magic

  • Comments 2

Here is a neat trick that we figured out a little while ago.  With a single command you can organize all of your virtual machines:


The command is:

Get-VM | %{ Move-VMStorage $_.Name "D:\Hyper-V\$($_.Name)" }

This command gets each virtual machine on the server, and then performs a storage migration to move it to a folder under “D:\Hyper-V” that has the same name as the virtual machine itself.  It is amazing how powerful such a simple command can be, and it has become a staple tool for me to clean up a server that I have been messing around with virtual machine placement on.


Leave a Comment
  • Please add 8 and 7 and type the answer here:
  • Post
  • I love the fact that it looks like the command is amazed by what you are doing:



    Jeffrey Snover [MSFT]

    Distinguished Engineer

  • Very Cool Stuff

Page 1 of 1 (2 items)

Storage Migration + PowerShell + Windows “8” = Magic