New Image Creation
Requirements
Instructions
Create Hyper-V VM
Set processor to 2 virtual processors
Enable TPM security
Disable network
Enable Guest Integration services
Install Windows with ISO
Create temp local account
Enable local Administrator account
Log out of temp local account
Login as local Administrator account
Delete temp local account
Create cleanup script on host machine
Open elevated Powershell
Run following command on host machine
Copy-VMFile "<vm name>" -SourcePath "<host full path>" -DestinationPath "<vm full path>" -CreateFullPath -FileSource Host
Run cleanup script on virtual machine
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
Unblock-File -Path <cleanup script path>
<cleanup script path>
Uninstall unneeded software
Shutdown
Enable network for the VM
Run the following command to export Start menu config:
Export-StartLayout -Path <filename>.xml
Save the XML file to the following folder
C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\
Create VM snapshot and reboot
Run sysprep, generalize, and shutdown
Start the DISM (Deployment and Imaging Tools Environment) as administrator and run the following commands:
copype amd64 C:\WinPE_amd64
MakeWinPEMedia /ISO C:\WinPE_amd64 C:\WinPE_amd64\WinPE_amd64.iso
Enable bridged network for VM
Boot into WinPE ISO from VM in Hyper-V
Run the following commands:
diskpart
list disk
select disk 0
list volume
select volume 1
assign letter=C
exit
This is to exit diskpart
net use \\<network location>
dism /Capture-Image /Compress:maximum /ImageFile:\\<network location>\<filename>.wim /CaptureDir:C:\ /Name:"<image name>"
Import the WIM file into Windows System Image Manager and configure an answer file for this installation
The WIM file is a barebones, clean Windows image that can be used with Microsoft Deployment Toolkit to image district computers
The answer file is to automate the fresh installation setup options