Moving VM to Folder in vCenter


To make things more organized in vCenter, I use folders to categorize the servers with the same functions together. The folders can be Production with subfolders SQL server, Linux server … But somehow, two servers refused to move. Everything looks fine, they just did not want to move to a new folder.

After being frustrated by that in vSphere client, I decided to try vSphere PowerCLI. And it turns out I have more luck out there : )

Just simply connect the vCenter server, then list the folder names, use the move-vm to move the VM wherever you want them to be.

1) Connect-VIServer vcs-server-name -User jackie.chen  -Password **********

2) Get-Folder

3) Move-VM -VM vm-name -Destination folder-name

Advertisements

5 thoughts on “Moving VM to Folder in vCenter

    1. Hi, if the folder is not unique it does not work!

      Move-VM -VM mytest1 -Destination TEST
      Move-VM : 7/23/2014 2:44:01 PM Move-VM The specified parameter ‘Destination’ expects a single value, but your name cr
      iteria ‘TEST’ corresponds to multiple values.

      Regards Denis

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s