Managing Images and Deployments Using the Windows
Total Page:16
File Type:pdf, Size:1020Kb
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 Start menu, expand Windows Kits, right-click Deployment and Imaging Tools Environment, click More, 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 File Explorer on the taskbar. 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, copy 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 Windows 10 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, type the following cmdlet, and then press Enter: Import-Module "C:\Program Files (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 –Path E:\Winpe64\Mount Task 3: Add drivers and optional components to the Windows PE image 1. To add the Microsoft 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: CD “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 Sysprep 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 Format. 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.xml, 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 settings 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-Shell-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 label, 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.