Advertisement
guyrleech

Create many VMware VMs

Aug 24th, 2022
1,362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Assume already connected to vCenter/ESXi via Connect-VIServer
  2.  
  3. ## Change VM name, datastore, resource pool and network as required
  4.  
  5. 1..100 |%{ $vmname = "GLDUMCLDCTX$($_.ToString().PadLeft( 3 , '0' ))" ; $vmname ; $vm = New-VM -Name $vmname -Datastore "Ortial 1TB" -NumCpu 2 -MemoryGB 1 -ResourcePool Resources -Location Dummies -DiskStorageFormat Thin -DiskGB 1 -NetworkName "Internal Network" }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement