Quantcast
Channel: VMware Communities : All Content - VMware PowerCLI
Viewing all articles
Browse latest Browse all 16717

Try to create new VM when connected to multiple servers

$
0
0

Hi,

 

I'm trying to combined several scripts into one and make it automated.

Currently in our environment, we have 2 different Vcenter, so I use "Set-PowerCLIConfiguration -DefaultVIServerMode multiple -confirm:$false" to connect 2 servers at the beginning of the script.

I then run into issue that the script is not able to find the right location to create the new VM.

 

This is the current script does:

New-VM -name $Name -ResourcePool $pool -datastore $LUN -location $folder -template $Template

 

I tried to change it to:

New-VM -name $Name -Server $server -ResourcePool $pool -datastore $LUN -location $folder -template $Template

 

But I get error below.

New-VM The method of operation is not implemented.

 

Any help or suggestion would be very much appreciated.


Viewing all articles
Browse latest Browse all 16717

Trending Articles



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