Using fogproject to deploy Windows 10 images
Despite the web is full of pages about fogproject and Windows 10, there are many different things that you need to do in order to make fog to deploy a Windows 10 image in a fully automated way (without your physical intervention). This is my guide, just in case.
What is fogproject?
FOG Project is a set of tools made for automatic deployment of system images. For example, if you have a set of machines (a lab, an office, etc) that needs to be prepared with software, configuration, preloaded data, you can prepare a set of "master" machines (one for each kind of image you'll need) and use them as a template, ready to be deployed in a hundred of PCs with a few clicks.
More info at: https://fogproject.org/
Requirements
- A running fogserver instance (I'll not cover the installation, it's pretty trivial)
- An hypervisor (even VirtualBox is good) that can boot from network
- Windows 10 ISO (you can find it on Microsoft's official website)
- Windows 10 ADK (again, go on official Microsoft website)
- A lot of time
Step 1: Master image
The first thing that we need to do is to install a master image. Let's create a VM for Windows 10 and start it with the ISO loaded into the CD-ROM bay. After creating the VM, you need to change the boot order to have the network boot first (refer to your hypervisor manual). The NIC should be in the same network of the fog server (so you'll probably use the bridge mode). Before installing Windows 10, boot from network and add the VM to fog inventory.
After the inventory, you can boot the Windows installer from the ISO. Note that you'll need to stop installing when Windows 10 starts loading from disk (eg. after the first reboot) and press CTRL-SHIFT-F3 in order to enter into the "Audit mode". In this mode, everything that you'll customize will be saved as "Default User" profile (eg. the default setting for all new users).
You can dismiss the dialog about sysprep for now, and start personalizing it (eg. you can install applications, do changes, etc).
One thing that you'll need to install is the Deployment Tools of the Windows ADK. They'll be needed for the next step.
Also, in order to deploy printers, snapins and other things, you'll need to install the FOG Client. After installing it, you'll need to disable temporarly in order to work with sysprep (open a command prompt):
sc stop FOGService sc config FOGService start= disabled
In order to start again the service, modify the following file:
C:\Windows\Setup\scripts\SetupComplete.cmd
and append/add the following:
sc config FOGService start= auto shutdown -t 0 -r
When you have finished with customization, we need to automatize the OOBE part (Out Of the Box Environment; in other words, the wizard that you see the first time that you run Windows). That's because I want that the PC is ready at the end of the procedure.
Open the WISM from here:
C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\WSIM\imgmgr.exe
And customize the response file. Then, save the file in some local storage (such as c:\).
Make sure that you make all the updates to Windows. Then, shutdown the VM and take a snapshot. If you need to change something (such as update some software, or change some settings), you'll need to revert back to this snapshot.
Step 2: ready to sysprep and image
Go on the fog web admin and schedule a capture for this host. Start the VM and skip the sysprep window, we'll need to launch if from the command line in order to specify the answer file. Open a command prompt with admin rights and do the following:
cd c:\Windows\System32\sysprep
sysprep /oobe /generalize /reboot /unattend:C:\unattended.xml
At the end, you'll have a generic Windows 10 image with your customization imaged into fog.
Step 3: deploy
You can deploy the image as usual, by using the web interface and/or when you're inventorying new PCs.