How to create multiple vms using powercli

powershell script to create multiple vms in VMware cluster



connect-viserver vcenter01 -user administrator@vsphere.local -password VMware1!

Write-host “No of VMs to deploy”


write-host “Enter the naming convention”


for($count=0;$count -le ($noofvms-1);$noofvms++)


new-vm -name ($vmname+$count) -vmhost (get-cluster cluser01|get-vmhost|get-random) -disksizemb 100 -portgroup vlan100




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: