vSphere PowerCLI Cmdlets Basic Reference Part 1
Creates a new virtual machine with the provided parameters. The network adapter and the SCSI adapter of the new virtual machine are created of the recommended type for the OS that is specified by the GuestId parameter. If the OSCustomizationSpec parameter is used, the virtual machine is customized according to the spec.
- Run below command to create Virtual machine
Creates a virtual machine named VM on the Host host with defined HDD/ RAM size
New-VM -Name VM -VMHost Host -DiskMB 20 -MemoryMB 256


- Or Run below command to create Virtual machine in the ResourcePool resource pool.
New-VM -Name VM -VMHost Host -ResourcePool ResourcePool -DiskMB 6000 -MemoryMB 1000
- Run below command to create template from VM
New-Template -VM VM1 -Name Template -Location Datacenter
- Run virtual machine
Start-VM -VM VM -Confirm -RunAsync

Asynchronously starts the virtual machine named VM. Before initializing the task, asks for confirmation


- Stops the virtual machines with Confirmation .
Stop-VM -VM VM -Confirm

Stops the virtual machine named VM after confirmation by the user.


- Stops the virtual machines by terminating its process
Stop-VM -VM VM -Kill -Confirm:$false
