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

Re: Clone a template to a specific folder on datastore, with powercli???

$
0
0

Yes, you can use the ResourcePool parameter on the New-VM cmdlet for that.

But since you have resourcepools with the same name in the tree structure, you will have to make sure you select the correct one.

You use the Location parameter to indicate which branch in the tree you want.

 

For example:

$rpRoot = Get-ResourcePoo -Name "Sprint 2013"

$rpCourse = Get-ResourcePoo -Name "5555 Foo" -Location $rpRoot

$rpServers = Get-ResourcePoo -Name "Servers" -Location $rpCourse

$rpStudents = Get-ResourcePoo -Name "Students" -Location $rpCourse

 

New-VM -Name .... -ResourcePool $rpStudents

You can build this logic into a loop and use the names from a CSV file for example


Viewing all articles
Browse latest Browse all 244595

Trending Articles