New-FactoryVM.ps1
Source file scripts/factory/New-FactoryVM.ps1. This page is generated from the file’s own help comment when the site is built.
Help text
Section titled “Help text”.SYNOPSIS Builds (or rebuilds) the code factory's Hyper-V VM: Windows installed from an ISO, unattended, ready for PowerShell Direct..DESCRIPTION Run elevated (Hyper-V needs it). Creates a Gen 2 VM on the Default Switch with an empty disk, the ISO in its DVDdrive and a small second disk holding autounattend.xml (local admin "factory", auto sign-in, remoting on). WindowsSetup does the partitioning and boot files inside the VM. Then it waits for the signed-in desktop, removes theinstaller media and checkpoints the VM as "windows-ready". The VM's password is generated once and kept inThen run Install-FactoryTools.ps1..EXAMPLE powershell -File scripts\factory\New-FactoryVM.ps1 -Iso a local pathParameters
Section titled “Parameters”-Iso-Name-Root-DiskBytes-MemoryBytes-Cpus-Force