EV Reach - IT Process Automation Tutorial - Re-imaging a Windows Machine Remotely With WDS
ProcessAutomationsCaution
Objectives
In this tutorial, you will learn to use EV Reach's Process Automation framework and your WDS configuration to re-image a live Windows OS. Once this tutorial is complete, simply use the scope action or custom action to re-image any Windows machine.
Best Practice
ProcessAutomationsBestPractice
- If you have never created a Scope Action before, please refer to the below video and the Scope Action Creation Basics article for more information.
Prerequisites
- Live Windows OS - This method will only work against a Windows OS that is live and bootable to the desktop.
- Windows Deployment Services Server - You will need a pre-existing WDS environment with pre-configured Boot & OS Images. (Getting Started with WDS)
- Windows Assessment and Deployment Kit (Windows ADK) - You will need to have both the Deployment Tools (Deployment and Imaging Tools Environment) and the Windows Pre-installation Environment installed from the Kit. (Windows ADK)
- Administrative access - to both the WDS environment and the machine you are re imaging.
Step by Step Tutorial
Step 1: Preparing the Environment
1. Extract the WinPE Discovery image (WinPE boot.wim) from one of your OS boot images on your WDS server.
- Right-click the boot image of the OS you want to deploy.
- Click Create Discover Image.
See this video: It will guide you through extracting the boot.wim needed for this method to work properly.
2. Configuring and injecting the AutoUnattend.xml file into the boot.wim.
Refer to Sample WDS Client Answer Files. You can simply copy paste the Sample xml on the technet site titled "Sample Windows Deployment Services client unattend file" as shown below.
- Modify this answer file with notepad and enter the appropriate settings/credentials according to your WDS setup.
- Save this file as AutoUnattend.xml.
- After creating the AutoUnattend.xml, store it in a safe place as we will need it for the next step.
3. Insert AutoUnattend.xml into WinPE Discovery Image to prepare the new WinPE directory structure.
- Use the DISM command to mount the boot.wim image created in Step 1.
Refer to the following TechNet article on Modifying a WIM Image Using DISM via the Mounting an Image Section.
- After mounting the boot.wim that was created in Step 1, you will see the following in your Mount Directory:
- Simply copy paste the autounattend.xml file into this directory. The result will be the following:
- Unmount the image with the /commit switch as mentioned in the section titled Unmounting an Image in the TechNet article above.
- Store this modified boot.wim file as we will be using it in the next step.
4. Create WinPE Directory(x86 or x64).
- On the machine that has the Windows ADK, go to All Programs > Windows Kits > Windows ADK and right-click Deployment and Imaging Tools Environment and select Run as Administrator.
- Run one of the below commands based on the Architecture type of the OS you are going to push to your machines:
- For AMD64(64-bit) images: copype amd64 C:\WinPE
- For x86(32-bit) images: copype x86 C:\WinPE
- After the command is completed your C:\WinPE directory will look as follows:
- Delete the folders titled fwfiles & mount.
- Now inside of the folder called media you will see the below folders:
- Select all the files and folders in C:\WinPE\media and cut them. Then paste them into C:\WinPE, one level above.
- Delete the, now empty media folder.
- Your final C:\WinPE folder should look like the below:
5. Copy the boot.wim created in Step 1 into the C:\WinPE\Sources directory.
There will be another file with the same name inside of it, simply overwrite/delete this file.
Step 2: Deploying Images with EV Reach
1. Once the WinPE directory is ready, use a EV Reach Scope or Custom Action to copy the WinPE directory locally.
2. Run the batch file to start the imaging process.