Add some VM scripts

This commit is contained in:
Markus Fleschutz
2023-12-05 09:05:50 +01:00
parent 587c0824b9
commit 9f56234f99
5 changed files with 50 additions and 0 deletions

4
scripts/import-vm.ps1 Normal file
View File

@ -0,0 +1,4 @@
$VMName = "debian"
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