scotty_p
Enthusiast
Enthusiast

Move VM to Folder - PowerCLI

I'm trying to move a VM to a sub-folder in vCenter

The Cluster is "Chicago, the fodler below is "Decommissioned" , the sub-folder is "Staging"

I'm trying to move with - move-vm -vm VM1 -destination "chicago\decommissioned\staging"

But that's failing with destination not found. How would I enter that correctly?

Thanks,

Scott

0 Kudos
1 Reply
LucD
Leadership
Leadership

Provided your Staging folder is unique in your vCenter, you can do it like this

Move-VM -VM vm1 -Destination (Get-Folder -Name Staging)


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

0 Kudos