Steps to create and manage Hyper-V virtual machines in Powershell:
- Create a new Virtual Hard Drive Disk with following command
- "New-VHD -Path "[Path to Virtual Machines Directory]" -SizeBytes [Big enough to hold and manage data] GB -Dynamic
- Create the new VM using the following command
- "New-VM -Name "[Name of Machine]" -MemoryStartupBytes [reasonable size]GB -Generation 2 -VHDPath [Path from Step 1] -SwitchName "[VM Switch]" "
- Set # of processor cores for VM with the following command
- "Set-VMProcessor -VMName "[Name of VM]" -Count [Desired # of processor cores]
- Manage machine memory with the following:
- "Set-VMMemory -VMName "[Name of VM]" -StartupBytes [New Size]GB
- Set checkpoints to OFF with the following:
- "Set-VM -Name "[Name of VM]" -CheckpointType Disabled "
- Add an OS ISO to Virtual Machine using following command
- Add-VMDVDDrive -VMName
-Path 