VMware Cloud Community
faf1967
Contributor
Contributor
Jump to solution

Powercli Migrate to new ESX host and new datastore

I have 250 VMs that need to migrate to a new cluster and newdatastores, however I do not see where I can do both in apowercli script. Does anyone have any suggestions?

I am really new to powercli and I am usingpowercli6.

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Are you getting any error messages ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
4 Replies
LucD
Leadership
Leadership
Jump to solution

On the Move-VM cmdlet you can specify a Destination, which can be a cluster, and a Datastore.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
faf1967
Contributor
Contributor
Jump to solution

Do you have an example? I've tried all different combinations using move-vmand nothing seems to work.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Are you getting any error messages ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
faf1967
Contributor
Contributor
Jump to solution

I had a typo.

This worked... It's always the little things.

Thanks for your help

Get-VM -Name "[guest vm name" | Move-VM -Datastore [datastorename] -Destination [hostname] -runasync

0 Kudos