mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
12 lines
424 B
PowerShell
12 lines
424 B
PowerShell
Param(
|
|
[string]$vmName,
|
|
[string]$hardDiskPath,
|
|
[string]$isoPath
|
|
)
|
|
|
|
New-VM -Name $vmName -MemoryStartupBytes 268435456 -BootDevice CD -Generation 1
|
|
|
|
Add-VMHardDiskDrive -VMName $vmName -ControllerNumber 0 -ControllerLocation 0 -Path $hardDiskPath
|
|
Set-VMDvdDrive -VMName $vmName -ControllerNumber 1 -ControllerLocation 0 -Path $isoPath
|
|
|
|
Set-VMComPort -VMName $vmName -Path \\.\pipe\CosmosSerialHyperV -Number 1
|