![]() ![]() ![]() $featureLogPath = "c:\poshlog\featurelog.txt" In the Execution Policy Change dialog, select Yes to All. Install any updates to ensure that the VM is fully up-to-date.īefore you install Windows Server AD, run a script that installs prerequisites: When the installation is finished, restart the virtual machine.Select Custom: Install Windows Only (Advanced).Select the I accept the license terms checkbox and select Next.Enter your license key and select Next.In the Windows Server start window, select your language, and then select Next.At the prompt, press any key to boot from CD or DVD.In Hyper-V Manager, double-click the virtual machine.To finish creating the virtual machine, install the operating system: Set-VMFirmware -VMName $VMName -FirstBootDevice $DVDDrive #Configure the virtual machine to boot from the DVD $DVDDrive = Get-VMDvdDrive -VMName $VMName Set-VMMemory $VMName -DynamicMemoryEnabled $falseĪdd-VMDvdDrive -VMName $VMName -ControllerNumber 0 -ControllerLocation 1 -Path $InstallMedia New-VM -Name $VMName -MemoryStartupBytes 16GB -BootDevice VHD -Path $Path -NewVHDPath $VHDPath -NewVHDSizeBytes $VHDSize -Generation 2 -Switch $Switch Run the following script: #Declare variables Open Windows PowerShell ISE as administrator. ![]() In the Execution Policy Change dialog, select Yes. If you've never run a script in PowerShell on your host machine, before you run any scripts, open Windows PowerShell ISE as administrator and run Set-ExecutionPolicy remotesigned. ![]()
0 Comments
Leave a Reply. |