Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 236436

Re: I want to move VMs to a folder name called Linux, but we have multiple folder by the same name in our Datacenter, please provide me PowerCLI Script to move exactly

$
0
0

Once the function is dot-sourced, you can call it.

So you do

. ./FolderByPath.ps1

$folder = Get-FolderByParh  -Path "LTX01-G8/LTX-Servers/LTX Servers 0000 - 0299/Linux"

Get-VM -Name YourVM | Move-VM -Destination $folder

This will move 1 VM, called YourVM to the folder.

 

Note that you have to do the dot-sourcing only once in your session.


Viewing all articles
Browse latest Browse all 236436

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>