PowerShell/scripts/import-vm.ps1

4 lines
266 B
PowerShell
Raw Normal View History

2024-10-01 15:11:03 +02:00
$VMName = "debian"
2023-12-05 09:05:50 +01:00
Get-ChildItem "C:\packer\$VMName\Virtual Machines\*.vmcx" | Import-VM -Copy -VhdDestinationPath "C:\VirtualMachines\$VMName\Virtual Hard Disks" -VirtualMachinePath "C:\VirtualMachines\$VMName" -GenerateNewId
Start-VM $VMName
exit 0 # success