<<

Module 5: Managing images and deployments using the Windows ADK Lab A: Preparing the imaging and Windows PE environment (VMs: 20695D-LON-DC1, 20695D-LON-CFG, 20695D-LON-REF1) Exercise 1: Configuring a custom Windows PE environment Task 1: Set up the Windows PE build environment 1. On LON-CFG, open the menu, expand Windows Kits, right-click Deployment and Imaging Tools Environment, click , and then click Run as administrator. 2. In the Administrator: Deployment and Imaging Tools Environment window, create the directory structure by typing the following command, and then pressing Enter: Copype amd64 E:\Winpe64 3. Minimize the Deployment and Imaging Tools Environment window. 4. Click on the . 5. In the navigation pane, expand Allfiles (E:), expand WinPE64, expand Media, and then click Sources. Note: Note the size of the Boot.wim file. It will be 239,002 kilobytes (KB). 6. Close File Explorer. Task 2: Mount the base Windows PE image Note: To avoid syntax errors, and paste the commands into the Windows PowerShell command prompt from the E:\Labfiles\Mod05\Mod05_DISM_Powershell.txt file. 1. Click Start and then click the Windows PowerShell tile. Note: The version of DISM installed with Windows ADK for is not the same as the version in the default Windows PowerShell console. You must add the correct DISM module for the current version of Windows ADK. 2. In the Administrator: Windows PowerShell window, the following cmdlet, and then press Enter: Import-Module "C:\ (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\DISM" 3. In the Administrator: Windows PowerShell window, mount the Boot.wim image by typing the following command, and then pressing Enter: Mount-WindowsImage –ImagePath E:\Winpe64\Media\Sources\Boot.wim – Index 1 – E:\Winpe64\Mount Task 3: Add drivers and optional components to the Windows PE image 1. To add the Hyper-V drivers to the Windows PE image, type the following command, and then press Enter: Add-WindowsDriver –Path E:\winpe64\mount –Driver E:\Software\Drivers\HyperVx64 -Recurse -ForceUnsigned Note: The third-party drivers you injected into the image will be listed. Confirm that the last one on the list has a Published Name of oem9.inf. 2. To add support for the Windows PowerShell command-line interface to the Windows PE image, type the following commands, and then press Enter after each: “C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment kit\Windows preInstallation Environment\amd64\WinPE_OCs” Add-WindowsPackage –Path E:\winpe64\mount –PackagePath .\WinPE- NetFX.cab Add-WindowsPackage –Path E:\winpe64\mount –PackagePath .\WinPE-Scripting.cab Add-WindowsPackage –Path E:\winpe64\mount –PackagePath .\WinPE- WMI.cab Add-WindowsPackage –Path E:\winpe64\mount –PackagePath .\WinPE- PowerShell.cab Add-WindowsPackage –Path E:\winpe64\mount –PackagePath .\WinPE- DismCmdlets.cab Note: Each Add-WindowsPackage cmdlet might take several minutes. Note: To avoid syntax errors, copy and paste the commands from the E:\Labfiles\Mod05\Mod05_DISM_Powershell.txt file into the Windows PowerShell command prompt. Task 4: Save changes and dismount the image 1. Commit the changes to the Windows PE image by typing the following command, and then pressing Enter: Dismount-WindowsImage –Path E:\winpe64\mount –Save 2. Use File Explorer to view the contents of the E:\Winpe64\media\Sources folder. Note the new size of the Boot.wim file. 3. Close File Explorer and Windows PowerShell. Task 5: Create Windows PE Media 1. To create an International Organization for Standardization (ISO) image of the Boot.wim that you can use to create boot media, restore the Deployment and Imaging Tools Environment window, and then run the following commands, pressing Enter after each command: MD E:\BootISO MakeWinpeMedia /iso E:\Winpe64 E:\BootISO\WinPEx64.iso 2. Use File Explorer to open the E:\BootISO folder, and then ensure that the WinPEx64.iso file was created. Results: After completing this exercise, you should have customized the Windows Preinstallation Environment (Windows PE) image and created an .iso file of the image. Task 6: Prepare for the next lab • Leave the virtual machines running for the next lab. Do not revert.

Lab B: Building a reference image by using Windows SIM and Exercise 1: Building a custom answer file by using Windows SIM Task 1: Create a new answer file on a virtual floppy disk by using Windows SIM 1. In the 20695D-LON-CFG virtual machine connection window, click Media, point to Diskette Drive, and then click Insert Disk. 2. Navigate to D:\Program Files\Microsoft Learning\20695\Drives, select the reference.vfd file, and then click Open. 3. On LON-CFG, on the taskbar, click File Explorer and click This PC. Right-click Floppy Disk Drive (A:), and then click . 4. In the Format Floppy Disk Drive (A:) window, click Start. 5. In the Format Floppy Disk Drive (A:) warning window, click OK. 6. In the Format Floppy Disk Drive (A:) Format Complete window, click OK. 7. In the Format Floppy Disk Drive (A:) window, click Close. 8. Close File Explorer. 9. Open the Start screen, and then click Windows Kits. Locate and click Windows System Image Manager from the list. 10. In Windows System Image Manager, click File, and then click Select Windows Image. 11. In the Select a Windows Image dialog box, browse to the E:\sources folder, select install.wim, and then click Open. 12. In the Windows System Image Manager message box, click Yes. The catalog creation will take a few minutes. 13. In the Answer File pane, right-click Create or open an answer file, and then click Open Answer File. 14. In the Open dialog box, browse to the E:\Labfiles\Mod05 folder, select Autounattend_x64_BIOS_sample., and then click Open. 15. In the Windows System Image Manager pop-up window, click Yes to associate the answer file with the image. 16. In Windows System Image Manager, click File, and then click Save Answer File As. 17. In the Save As dialog box, click This PC, double-click Floppy Disk Drive (A:), in the File name field, type Autounattend and then click Save. Task 2: Add and configure component and component 1. In the Answer File pane, expand 1 WindowsPE, expand amd64_Microsoft- WindowsSetup_neutral, select UserData, and then in the FullName field, type your name. In the Organization field, type Adatum. 2. Expand UserData, right-click ProductKey, click Delete, and then click Yes. 3. In the Windows Image pane, expand Components, right-click amd64_Microsoft-WindowsUnattendedJoin_10.0.17134.1._neutral, and then click Add Setting to Pass 4 specialize. 4. In the Answer File pane, under 4 specialize, select amd64_Microsoft- Windows-ShellSetup_neutral. In the ComputerName field, type Reference. 5. Expand amd64_Microsoft-Windows--Setup_neutral, right-click and delete the OEMInformation component, and then click Yes. Note: In the list of component names, note that after amd64_Microsoft- Windows, the rest of the component name is alphabetically listed. 6. Under 4 specialize, expand amd64_Microsoft-Windows- UnattendedJoin__neutral, select Identification, and then in the JoinWorkgroup field, type imaging. 7. In the Windows Image pane, under Components, right-click amd64_Microsoft- WindowsInternational-Core_10.0.17134.1_neutral, and then click Add Setting to Pass 7 oobeSystem. 8. In the Windows Image pane, under Components, expand amd64_Microsoft- Windows-ShellSetup_10.0.17134.1_neutral, right-click OOBE, and then click Add Setting to Pass 7 oobeSystem. 9. In the Windows Image pane, under amd64_Microsoft-Windows- ShellSetup_10.0.17134.1_neutral, expand UserAccounts, right-click AdministratorPassword, and then click Add Setting to Pass 7 oobeSystem. 10. In the Windows Image pane, under amd64_Microsoft-Windows- ShellSetup_10.0.17134.1_neutral, User Accounts, expand LocalAccounts, right- click LocalAccount, and then click Add Setting to Pass 7 oobeSystem. 11. In the Answer File pane, under 7 oobeSystem, select amd64_Microsoft- Windows-InternationalCore_neutral. In the InputLocale, UILanguage and UserLocale fields, type en-us. 12. In the Answer File pane, under 7 oobeSystem, select amd64_Microsoft- Windows-ShellSetup_neutral. 13. In the TimeZone field, type Pacific Standard Time. 14. Select OOBE, in the HideEULAPage line, click the drop-down list, and then select true. 15. In the NetworkLocation line, click the drop-down list, and then select Work. 16. Expand UserAccounts, select AdministratorPassword, right-click the Value , and then select Write Empty String. 17. Expand LocalAccounts, and then select LocalAccount. In the DisplayName field, type your full name. In the Group field, type Administrators, and then in the Name field, type your first name. 18. Expand LocalAccount[Name=”yourname”], select Password, and then in the Value field, type Pa55w.rd 19. In the Windows Image pane (directly beneath Components), expand Packages, expand Foundation, right-click amd64_Microsoft-Windows- Foundation-Package_10.0.17134.1, and then click Add to Answer File. 20. In the Answer File pane, expand Packages, expand Foundation, and then select amd64_MicrosoftWindows-Foundation-Package_10.0.17134.1. 21. In the Microsoft-Windows-Foundation-Package Properties pane, expand Microsoft-Hyper-V All, right-click Microsoft-Hyper-V-Tools-All, and then click Enable Parent Features. If the Windows System Image Manager dialog box opens, click Yes. 22. Expand Microsoft-Hyper-V-Tools-All, and then enable Microsoft-Hyper-V- Management-Clients and Microsoft-Hyper-V-Management-PowerShell. Task 3: Validate and save the answer file 1. In the Windows System Image Manager, click Tools, and then click Validate Answer File. Note: You will see warnings that say The setting has not been modified. It will not be saved to the answer file. You will also see a warning that the Setting Network Location has been deprecated. You can ignore these warnings. 2. In Windows System Image Manager, click File, and then click Save Answer File. 3. In Windows System Image Manager, click File, and then click Close Answer File. Task 4: Create an answer file to preserve the profile 1. In Windows System Image Manager, click the File menu, and then click New Answer File. 2. In the Windows Image pane, expand Components, right-click amd64_Microsoft-Windows-ShellSetup__10.0.17134.1_neutral, and then click Add Setting to Pass 4 specialize. 3. In the Answer File pane, select the Components\4_specialize\amd64- Microsoft-Windows-ShellSetup_neutral folder. 4. In the Microsoft-Windows-Shell-Setup Properties pane, in the Settings section, set the value of CopyProfile to true. 5. Click File, and then click Save answer file As. 6. In the Save As dialog box, navigate to E:\Labfiles. In the File name field, type CopyProfile, and then click Save. 7. Click File, and then click to close Windows System Image Manager. 8. In the 20695D-LON-CFG window, click Media, point to Diskette Drive, and then click Eject Reference.vfd. Results: After completing this exercise, you should have created an answer file on a virtual floppy disk by using Windows System Image Manager (Windows SIM), added components and packages to the answer file, and validated and saved the answer file.

Exercise 2: Installing a reference computer using a custom answer file Task 1: Mount the Windows 10 media, and start the unattended installation 1. In Hyper-V Manager, double-click 20695D-LON-REF1. 2. In the 20695D-LON-REF1 window, click Media, point to Diskette Drive, and then click Insert Disk. 3. Browse to D:\Program Files\Microsoft Learning\20695\Drives. Select the reference.vfd file, and then click Open. 4. In the 20695C-LON-REF1 window, click Media, point to DVD Drive, and then click Insert Disk. 5. Browse to D:\Program Files\Microsoft Learning\20695\Drives, select Win10_1803_eval.iso, and then click Open. 6. Start 20695C-LON-REF1. Note: The installation can take 30 minutes. Task 2: Verify that answer file settings have applied 1. Once the installation has completed, click Skip for now on the Let’s connect you to a network page. 2. Click Accept on the Choose privacy settings for your device page. 3. Sign in to LON-REF1 by using the local account you provided in the answer file. If the Networks configuration window opens, click No. 4. In the , click the Windows Administrative Tools folder and verify that the Hyper-V manager is present. 5. In the Start search box, type and press Enter. 6. Click the View by drop-down list box, and then select Small icons. 7. In the Control Panel, click System. 8. Read the listings in the System window. In Computer name, domain and workgroup settings, you should see that the Computer name is Reference and the Workgroup is imaging. 9. Right-click the Start button, and then click Computer Management. 10. In Computer Management, expand Local Users and Groups, and then select the Users container. Note: Your user account displays the full name and description that you entered in the answer file. 11. Double-click your user account, and then click the Member Of tab. You should see that your account is a member of the Administrators group. Click Cancel to close the window. 12. In Computer Management, click Disk Management. You should see the System partition is 350 megabyte (MB). 13. Close all open windows. 14. In the 20695C-LON-REF1 window, click Media, click DVD Drive, and then click Eject Win10_1803_eval.iso. Results: After completing this exercise, you should have mounted the Windows 10 media, performed an unattended installation, and verified that the answer-file settings were applied.

Exercise 3: Customizing your image in audit mode, and preserving the profile changes by using Sysprep Task 1: Boot into the audit mode and configure changes as required 1. On LON-REF1, right-click the Start button, and then click Run. 2. Type \\LON-CFG\E$\Software click OK, and in the Enter network credentials dialog box, type Adatum\Administrator in the User name field, and then type Pa55w.rd in the Password field. 3. Select the Remember my credentials check box, and then click OK. 4. Double-click the Office Viewers folder, double-click the PPTViewer folder, and then double-click PowerPointViewer.exe. 5. In the dialog box, click Yes. 6. Select the Click here to accept the Microsoft Terms check box, and then click Continue. 7. In the Microsoft PowerPoint Viewer Setup window, click Next, and then click Install. 8. When installation completes, click OK. 9. Close File Explorer. 10. Click the Start button and type cmd into the search box. Right-click cmd and click Run as administrator. 11. In the User Account Control dialog box, click Yes. 12. In the Administrator: Command Prompt window, type the following and then press Enter: CD Sysprep 13. In the Administrator: Command Prompt window, type the following and then press Enter: Sysprep /audit /reboot 14. After the reboot, LON-REF1 will sign in as the Administrator automatically, by using a blank password. This will take 5–10 minutes to complete. Ignore the Sysprep dialog box for the being. 15. In the search box, type Control Panel and then press Enter. 16. Click the View by drop-down list box, and then select Small icons. 17. In the Control Panel, click System. 18. In the System window, click Advanced system settings. 19. In the System Properties dialog box, click Advanced, and then in the User Profiles section, click Settings. 20. Select the profile for your user account, and then click Delete. In the Confirm Delete dialog box, click Yes. 21. In the User Profiles dialog box, click OK. 22. In the System Properties dialog box, click OK. 23. Right-click the Start button, click Computer Management, expand Local Users and Groups, and then select Users. 24. Right-click your user account, and then click Delete. 25. In the Local Users and Groups pop-up window, click Yes, and then click OK. 26. Close all open windows, including the System Preparation Tool 3.14 dialog box. 27. Click the Start button. 28. Locate and right-click Microsoft PowerPoint Viewer, and then click Pin to Start. Verify that it appears on the Start screen. 29. Drag the Microsoft PowerPoint Viewer tile to an empty spot below the Play group. Click the blue bar above the tile and click into the name field. Name the application group Business Apps. 30. Expand Windows Accessories, right-click , expand More, and then click Pin to taskbar. 31. Press the Esc key to go to the desktop, and then verify that the Snipping Tool appears on the taskbar. Task 2: Run Sysprep with the /generalize, /oobe, /, and /unattend switches 1. On LON-REF1, click into the search box and type cmd. Right-click the Command Prompt and click Run as administrator. 2. the Administrator: Command Prompt window, type the following, and then press Enter: CD C:\Windows\System32\Sysprep 3. At the Administrator: Command Prompt window, type the following command, and then press Enter: Sysprep /generalize /oobe /shutdown /unattend:\\lon-cfg\E$\Labfiles\ copyprofile.xml Results: After completing this exercise, you should have the Windows 10 reference system generalized and ready for imaging. Task 3: Prepare for the next lab • Keep all virtual machines in their current state for the next lab. Do not revert them.

Lab C: Capturing a reference image Exercise 1: Capturing a reference system image Task 1: Boot the reference computer by using Windows PE 1. In Hyper-V Manager, double-click 20695D-LON-REF1. 2. In the 20695D-LON-REF1 window, click Media, point to DVD Drive, and then click Insert Disk. 3. Browse to D:\Program Files\Microsoft Learning\20695\Drives, select WinPEx64.iso, and then click Open. 4. Start 20695D-LON-REF1. When prompted, hit a key to start from the DVD. Task 2: Use to assign a drive letter 1. From the command prompt type Diskpart, and then press Enter. 2. From the Diskpart prompt, type the following commands, pressing Enter after each one: Select disk 0 List partition Select partition 2 Assign letter Exit Task 3: Use DISM to capture the reference image to the shared network folder 1. At the command prompt, type the following command, and then press Enter: Use G: \\LON-CFG\E$\images /User:Adatum\Administrator 2. When prompted, type the password Pa55w.rd. Ensure that the command completes successfully. 3. At the command prompt, type the following command, and then press Enter: DISM /Capture-Image /Imagefile:G:\Win10.wim /CaptureDir:R:\ /Name:”Adatum Windows 10” Note: For a few minutes, the cursor will continue to sit at the prompt, but then the image save will begin. At that point, you can shut down the virtual machine. Results: After completing this exercise, you should have booted the reference machine into your customized Windows PE image, used Diskpart to assign a drive letter, and used DISM commands to capture the image to the shared network folder. Task 4: Prepare for the next module When you finish the lab, revert the virtual machines to their initial state. To do this, complete the following steps: 1. On the host computer, start Hyper-V Manager. 2. In the Virtual Machines list, right-click 20695D-LON-DC1, and then click Revert. 3. In the Revert Virtual Machine dialog box, click Revert. 4. Repeat steps 2 and 3 for 20695D-LON-CFG and 20695D-LON-REF1.