mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-06-06 01:27:21 +00:00
removed poc topics
This commit is contained in:
parent
79092203e7
commit
ded230295e
@ -1,531 +0,0 @@
|
||||
---
|
||||
title: Placeholder (Windows 10)
|
||||
description: Deploy Windows 10 in a test lab using Microsoft Deployment Toolkit
|
||||
ms.prod: w10
|
||||
ms.mktglfcycl: deploy
|
||||
ms.sitesec: library
|
||||
ms.pagetype: deploy
|
||||
author: greg-lindsay
|
||||
---
|
||||
|
||||
# Deploy Windows 10 in a test lab using Microsoft Deployment Toolkit
|
||||
|
||||
**Applies to**
|
||||
|
||||
- Windows 10
|
||||
|
||||
**Important**: This guide leverages the proof of concept (PoC) environment configured using procedures in [Step by step guide: Deploy Windows 10 in a test lab](windows-10-poc.md). Please complete all steps in the prerequisite guide before attempting the procedures in this guide.
|
||||
|
||||
The PoC environment is a virtual network running on Hyper-V with three virtual machines:
|
||||
- **DC1**: A contoso.com domain controller, DNS server, and DHCP server.
|
||||
- **SRV1**: A dual-homed contoso.com domain member server, DNS server, and default gateway providing NAT service for the PoC network.
|
||||
- **PC1**: A contoso.com member computer running Windows 7, Windows 8, or Windows 8.1 that has been cloned from a physical computer on your corporate network for testing purposes.
|
||||
|
||||
This guide leverages the Hyper-V server role to perform procedures. If you do not complete all steps in a single session, consider using [checkpoints](https://technet.microsoft.com/library/dn818483.aspx) and [saved states](https://technet.microsoft.com/library/ee247418.aspx) to pause, resume, or restart your work.
|
||||
|
||||
## In this guide
|
||||
|
||||
Description here.
|
||||
|
||||
## Install the Microsoft Deployment Toolkit (MDT)
|
||||
|
||||
1. On SRV1, temporarily disable IE Enhanced Security Configuration for Administrators by typing the following commands at an elevated Windows PowerShell prompt:
|
||||
```
|
||||
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
|
||||
Set-ItemProperty -Path $AdminKey -Name “IsInstalled” -Value 0
|
||||
Stop-Process -Name Explorer
|
||||
```
|
||||
2. Download and install the 64-bit version of [Microsoft Deployment Toolkit (MDT) 2013 Update 2](https://www.microsoft.com/en-us/download/details.aspx?id=50407) on SRV1 using the default options.
|
||||
|
||||
3. Download and install the latest [Windows Assessment and Deployment Kit (ADK)](https://developer.microsoft.com/en-us/windows/hardware/windows-assessment-deployment-kit) on SRV1 using the default installation settings. The current version is the ADK for Windows 10, version 1607. Installation might require several minutes to acquire all components.
|
||||
|
||||
3. If desired, re-enable IE Enhanced Security Configuration:
|
||||
```
|
||||
Set-ItemProperty -Path $AdminKey -Name “IsInstalled” -Value 1
|
||||
Stop-Process -Name Explorer
|
||||
```
|
||||
|
||||
## Create a deployment share
|
||||
|
||||
1. In [Step by step guide: Deploy Windows 10 in a test lab](windows-10-poc.md) the Windows 10 Enterprise .iso file was saved to the c:\VHD directory as **c:\VHD\w10-enterprise.iso**. The first step in creating a deployment share is to mount this file on SRV1. To mount the Windows 10 Enterprise DVD on SRV1, open an elevated Windows PowerShell prompt on the Hyper-V host computer and type the following command:
|
||||
```
|
||||
Set-VMDvdDrive -VMName SRV1 -Path c:\VHD\w10-enterprise.iso
|
||||
```
|
||||
2. Connect to SRV1 and verify that the Windows Enterprise installation DVD is mounted as driver letter D.
|
||||
|
||||
3. The Windows 10 Enterprise installation files will be used to create a deployment share on SRV1 using the MDT deployment workbench. To open the deployment workbench, click **Start**, type **deployment**, and then click **Deployment Workbench**.
|
||||
|
||||
4. In the Deployment Workbench console, right-click Deployment Shares and select New Deployment Share.
|
||||
|
||||
5. Use the following settings for the New Deployment Share Wizard:
|
||||
- Deployment share path: **C:\MDTBuildLab**<BR>
|
||||
- Share name: **MDTBuildLab$**<BR>
|
||||
- Deployment share description: **MDT build lab**<BR>
|
||||
- Options: click **Next** to accept the default<BR>
|
||||
- Summary: click **Next**<BR>
|
||||
- Progress: settings will be applied<BR>
|
||||
- Confirmation: click **Finish**
|
||||
|
||||
6. Expand the Deployment Shares node, and then expand MDT build lab.
|
||||
|
||||
7. Right-click the Operating Systems node, and then click New Folder. Name the new folder **Windows 10**. Complete the wizard using default values and click **Finish**.
|
||||
|
||||
7. Right-click the Windows 10 folder created in the previous step, and then click **Import Operating System**.
|
||||
|
||||
8. Use the following settings for the Import Operating System Wizard:
|
||||
- OS Type: **Full set of source files**<BR>
|
||||
- Source: **D:\\** <BR>
|
||||
- Destination: **W10Ent_x64**<BR>
|
||||
- Summary: click **Next**
|
||||
- Confirmation: click **Finish**
|
||||
|
||||
9. For purposes of this test lab, we will not add applications (such as Microsoft Office) to the deployment share. For information about adding applications, see the [Add applications](https://technet.microsoft.com/en-us/itpro/windows/deploy/create-a-windows-10-reference-image#sec03) section of the [Create a Windows 10 reference image](create-a-windows-10-reference-image.md) topic in the TechNet library.
|
||||
|
||||
10. The next step is to create a task sequence to reference the operating system that was imported. To create a task sequence, right-click the **Task Sequences** node and then click **New Task Sequence**. Use the following settings for the New Task Sequence Wizard:
|
||||
- Task sequence ID: **REFW10X64-001**<BR>
|
||||
- Task sequence name: **Windows 10 Enterprise x64 Default Image** <BR>
|
||||
- Task sequence comments: **Reference Build**<BR>
|
||||
- Template: **Standard Client Task Sequence**
|
||||
- Select OS: click **Windows 10 Enterprise Evaluation in W10Ent_x64 install.wim**
|
||||
- Specify Product Key: **Do not specify a product key at this time**
|
||||
- Full Name: **Contoso**
|
||||
- Organization: **Contoso**
|
||||
- Internet Explorer home page: **http://www.contoso.com**
|
||||
- Admin Password: **Do not specify an Administrator password at this time**
|
||||
- Summary: click **Next**
|
||||
- Confirmation: click **Finish**
|
||||
|
||||
11. Edit the task sequence to add the Microsoft NET Framework 3.5, which is required by many applications. To edit the task sequence, double-click **Windows 10 Enterprise x64 Default Image** that was created in the previous step.
|
||||
|
||||
12. Click the **Task Sequence** tab. Under **State Restore** click **Tatto** to highlight it, then click **Add** and choose **New Group**.
|
||||
|
||||
13. On the Properties tab of the group that was created in the previous step, change the Name from New Group to **Custom Tasks (Pre-Windows Update)** and then click **Apply**.
|
||||
|
||||
14. Click the **Custom Tasks (Pre-Windows Update)** group again, click **Add**, point to **Roles**, and then click **Install Roles and Features**.
|
||||
|
||||
15. Under **Select the roles and features that should be installed**, select **.NET Framework 3.5 (includes .NET 2.0 and 3.0)** and then click **Apply**.
|
||||
|
||||
16. Enable Windows Update in the task sequence by clicking the **Windows Update (Post-Application Installation)** step, clicking the **Options** tab, and clearing the **Disable this step** checkbox.
|
||||
>Note: Since we are not installing applications in this test lab, there is no need to enable the Windows Update Pre-Application Installation step. However, you should enable this step if you are also installing applications.
|
||||
|
||||
17. Click **OK** to complete editing the task sequence.
|
||||
|
||||
18. The next step is to configure the MDT deployment share rules. To configure rules in the Deployment Workbench, right-click MDT build lab (C:\MDTBuildLab) and click **Properties**, and then click the **Rules** tab.
|
||||
|
||||
19. Replace the default rules with the following text:
|
||||
|
||||
```
|
||||
[Settings]
|
||||
Priority=Default
|
||||
|
||||
[Default]
|
||||
_SMSTSORGNAME=Contoso
|
||||
UserDataLocation=NONE
|
||||
DoCapture=YES
|
||||
OSInstall=Y
|
||||
AdminPassword=pass@word1
|
||||
TimeZoneName=Pacific Standard Time
|
||||
JoinWorkgroup=WORKGROUP
|
||||
HideShell=YES
|
||||
FinishAction=SHUTDOWN
|
||||
DoNotCreateExtraPartition=YES
|
||||
ApplyGPOPack=NO
|
||||
SkipAdminPassword=YES
|
||||
SkipProductKey=YES
|
||||
SkipComputerName=YES
|
||||
SkipDomainMembership=YES
|
||||
SkipUserData=YES
|
||||
SkipLocaleSelection=YES
|
||||
SkipTaskSequence=NO
|
||||
SkipTimeZone=YES
|
||||
SkipApplications=YES
|
||||
SkipBitLocker=YES
|
||||
SkipSummary=YES
|
||||
SkipRoles=YES
|
||||
SkipCapture=NO
|
||||
SkipFinalSummary=YES
|
||||
```
|
||||
|
||||
20. Click **Apply** and then click **Edit Bootstrap.ini**. Replace the contents of the Bootstrap.ini file with the following text, and save the file:
|
||||
```
|
||||
[Settings]
|
||||
Priority=Default
|
||||
|
||||
[Default]
|
||||
DeployRoot=\\SRV1\MDTBuildLab$
|
||||
UserDomain=CONTOSO
|
||||
UserID=administrator
|
||||
UserPassword=pass@word1
|
||||
SkipBDDWelcome=YES
|
||||
```
|
||||
|
||||
21. Click **OK** to complete the configuration of the deployment share.
|
||||
|
||||
22. Right-click **MDT build lab (C:\MDTBuildLab)** and then click **Update Deployment Share**.
|
||||
|
||||
23. Accept all default values in the Update Deployment Share Wizard by clicking **Next**. The update process will take 5 to 10 minutes. When it has completed, click **Finish**.
|
||||
|
||||
24. Copy **c:\MDTBuildLab\Boot\LiteTouchPE_x86.iso** on SRV1 to the **c:\VHD** directory on the Hyper-V host computer. Note that in MDT, the x86 boot image can deploy both x86 and x64 operating systems, except on computers based on Unified Extensible Firmware Interface (UEFI).
|
||||
|
||||
>Hint: Top copy the file, right-click the **LiteTouchPE_x86.iso** file and click **Copy** on SRV1, then open the **c:\VHD** folder on the Hyper-V host, right-click inside the folder and click **Paste**.
|
||||
|
||||
25. Open a Windows PowerShell prompt on the Hyper-V host computer and type the following commands:
|
||||
|
||||
```
|
||||
New-VM –Name REFW10X64-001 -SwitchName poc-internal -NewVHDPath "c:\VHD\REFW10X64-001.vhdx" -NewVHDSizeBytes 60GB
|
||||
Set-VMMemory -VMName REFW10X64-001 -DynamicMemoryEnabled $true -MinimumBytes 1024MB -MaximumBytes 1024MB -Buffer 20
|
||||
Set-VMDvdDrive -VMName REFW10X64-001 -Path c:\VHD\LiteTouchPE_x86.iso
|
||||
Start-VM REFW10X64-001
|
||||
vmconnect localhost REFW10X64-001
|
||||
```
|
||||
26. In the Windows Deployment Wizard, select **Windows 10 Enterprise x64 Default Image**, and then click **Next**.
|
||||
|
||||
27. Accept the default values on the Capture Image page, and click **Next**. Operating system installation will complete after 5 to 10 minutes and then the VM will reboot automatically. Allow the system to boot normally (do not press a key). The process is fully automated.
|
||||
|
||||
Additional system restarts will occur to complete updating and preparing the operating system. Setup will complete the following procedures:
|
||||
|
||||
- Install the Windows 10 Enterprise operating system.
|
||||
- Install added applications, roles, and features.
|
||||
- Update the operating system using Windows Update (or WSUS if optionally specified).
|
||||
- Stage Windows PE on the local disk.
|
||||
- Run System Preparation (Sysprep) and reboot into Windows PE.
|
||||
- Capture the installation to a Windows Imaging (WIM) file.
|
||||
- Turn off the virtual machine.
|
||||
|
||||
This step requires from 30 minutes to 2 hours, depending on the speed of the Hyper-V host. After some time, you will have a Windows 10 Enterprise x64 image that is fully patched and has run through Sysprep. The image is located in the C:\MDTBuildLab\Captures folder on your deployment server. The file name is **REFW10X64-001.wim**.
|
||||
|
||||
## Deploy a Windows 10 image using MDT
|
||||
|
||||
This procedure will demonstrate how to deploy the reference image to the PoC environment using MDT.
|
||||
|
||||
1. On SRV1, open the MDT Deployment Workbench console, right-click **Deployment Shares**, and then click **New Deployment Share**. Use the following values in the New Deployment Share Wizard:
|
||||
- **Deployment share path**: C:\MDTProd
|
||||
- **Share name**: MDTProd$
|
||||
- **Deployment share description**: MDT Production
|
||||
- **Options**: accept the default
|
||||
|
||||
2. Click **Finish** and verify the new deployment share was added successfully.
|
||||
|
||||
3. In the Deployment Workbench console, expand the MDT Production deployment share, right-click **Operating Systems**, and then click **New Folder**. Name the new folder **Windows 10** and complete the wizard using default values.
|
||||
|
||||
4. Right-click the Windows 10 folder created in the previous step, and then click **Import Operating System**.
|
||||
|
||||
5. On the **OS Type** page, choose **Custom image file** and then click **Next**.
|
||||
|
||||
6. On the Image page, browse to the C:\MDTBuildLab\Captures\REFW10X64-001.wim file created in the previous procedure, click **Open**, and then click **Next**.
|
||||
|
||||
7. On the Setup page, select **Copy Windows 7, Windows Server 2008 R2, or later setup files from the specified path**.
|
||||
|
||||
8. Under **Setup source directory**, browse to **C:\MDTBuildLab\Operating Systems\W10Ent_x64** click **OK** and then click **Next**.
|
||||
|
||||
9. On the Destination page, accept the default Destination directory name of **REFW10X64-001**, click **Next** twice, and then click **Finish**.
|
||||
|
||||
10. In the Operating Systems > Windows 10 node, double-click the operating system that was added to view its Properties. Change the Operating system name to **Windows 10 Enterprise x64 Custom Image** and then click **OK**.
|
||||
|
||||
### Create the deployment task sequence
|
||||
|
||||
1. Using the Deployment Workbench, select Task Sequences in the MDT Production node, and create a folder named **Windows 10**.
|
||||
|
||||
2. Right-click the Windows 10 folder created in the previous step, and then click **New Task Sequence**. Use the following settings for the New Task Sequence Wizard:
|
||||
- Task sequence ID: W10-X64-001
|
||||
- Task sequence name: Windows 10 Enterprise x64 Custom Image
|
||||
- Task sequence comments: Production Image
|
||||
- Select Template: Standard Client Task Sequence
|
||||
- Select OS: Windows 10 Enterprise x64 Custom Image
|
||||
- Specify Product Key: Do not specify a product key at this time
|
||||
- Full Name: Contoso
|
||||
- Organization: Contoso
|
||||
- Internet Explorer home page: http://www.contoso.com
|
||||
- Admin Password: pass@word1
|
||||
|
||||
### Configure the MDT production deployment share
|
||||
|
||||
1. On SRV1, open an elevated Windows PowerShell prompt and type the following commands:
|
||||
|
||||
```
|
||||
copy-item "C:\Program Files\Microsoft Deployment Toolkit\Templates\Bootstrap.ini" C:\MDTProd\Control\Bootstrap.ini -Force
|
||||
copy-item "C:\Program Files\Microsoft Deployment Toolkit\Templates\CustomSettings.ini" C:\MDTProd\Control\CustomSettings.ini -Force
|
||||
```
|
||||
2. In the Deployment Workbench console on SRV1, right-click the **MDT Production** deployment share and then click Properties.
|
||||
|
||||
3. Click the **Rules** tab and replace the rules with the following text:
|
||||
|
||||
```
|
||||
[Settings]
|
||||
Priority=Default
|
||||
|
||||
[Default]
|
||||
_SMSTSORGNAME=Contoso
|
||||
OSInstall=YES
|
||||
UserDataLocation=AUTO
|
||||
TimeZoneName=Pacific Standard Time
|
||||
OSDComputername=#Left("PC-%SerialNumber%",7)#
|
||||
AdminPassword=pass@word1
|
||||
JoinDomain=contoso.com
|
||||
DomainAdmin=administrator
|
||||
DomainAdminDomain=CONTOSO
|
||||
DomainAdminPassword=pass@word1
|
||||
ScanStateArgs=/ue:*\* /ui:CONTOSO\*
|
||||
USMTMigFiles001=MigApp.xml
|
||||
USMTMigFiles002=MigUser.xml
|
||||
HideShell=YES
|
||||
ApplyGPOPack=NO
|
||||
SkipAppsOnUpgrade=NO
|
||||
SkipAdminPassword=YES
|
||||
SkipProductKey=YES
|
||||
SkipComputerName=YES
|
||||
SkipDomainMembership=YES
|
||||
SkipUserData=YES
|
||||
SkipLocaleSelection=YES
|
||||
SkipTaskSequence=NO
|
||||
SkipTimeZone=YES
|
||||
SkipApplications=NO
|
||||
SkipBitLocker=YES
|
||||
SkipSummary=YES
|
||||
SkipCapture=YES
|
||||
SkipFinalSummary=NO
|
||||
EventService=http://SRV1:9800
|
||||
```
|
||||
**Note**: The contents of the Rules tab are added to c:\MDTProd\Control\CustomSettings.ini.
|
||||
|
||||
>In this example a **MachineObjectOU** entry is not provided. Normally this entry describes the specific OU where new client computer objects are created in Active Directory. However, for the purposes of this test lab clients are added to the default computers OU, which requires that this parameter be unspecified.
|
||||
|
||||
4. Click **Edit Bootstap.ini** and replace text in the file with the following text:
|
||||
```
|
||||
[Settings]
|
||||
Priority=Default
|
||||
|
||||
[Default]
|
||||
DeployRoot=\\SRV1\MDTProd$
|
||||
UserDomain=CONTOSO
|
||||
UserID=administrator
|
||||
UserPassword=pass@word1
|
||||
SkipBDDWelcome=YES
|
||||
```
|
||||
5. Click **OK** when finished.
|
||||
|
||||
### Update the deployment share
|
||||
|
||||
1. Right-click the **MDT Production** deployment share and then click **Update Deployment Share**.
|
||||
|
||||
2. Use the default options for the Update Deployment Share Wizard. The update process requires 5 to 10 minutes to complete.
|
||||
|
||||
3. Click **Finish** when the update is complete.
|
||||
|
||||
### Enable deployment monitoring
|
||||
|
||||
1. In the Deployment Workbench console, right-click **MDT Production** and then click **Properties**.
|
||||
|
||||
2. On the **Monitoring** tab, select the **Enable monitoring for this deployment share** checkbox, and then click **OK**.
|
||||
|
||||
3. Verify the monitoring service is working as expected by opening the following link on SRV1 in Internet Explorer: [http://localhost:9800/MDTMonitorEvent/](http://localhost:9800/MDTMonitorEvent/). If you do not see "**You have created a service**" at the top of the page, see [Troubleshooting MDT 2012 Monitoring](https://blogs.technet.microsoft.com/mniehaus/2012/05/10/troubleshooting-mdt-2012-monitoring/).
|
||||
|
||||
4. Close Internet Explorer.
|
||||
|
||||
### Configure Windows Deployment Services
|
||||
|
||||
1. Initialize Windows Deployment Services (WDS) by typing the following command at an elevated Windows PowerShell prompt on SRV1:
|
||||
|
||||
```
|
||||
WDSUTIL /Verbose /Progress /Initialize-Server /Server:SRV1 /RemInst:"C:\RemoteInstall"
|
||||
WDSUTIL /Set-Server /AnswerClients:All
|
||||
```
|
||||
|
||||
2. Click **Start**, type **Windows Deployment**, and then click **Windows Deployment Services**.
|
||||
|
||||
3. In the Windows Deployment Services console, expand Servers, expand SRV1.contoso.com, right-click **Boot Images**, and then click **Add Boot Image**.
|
||||
|
||||
4. Browse to the **C:\MDTProd\Boot\LiteTouchPE_x64.wim** file, click **Open**, click **Next**, and accept the defaults in the Add Image Wizard. Click **Finish** to complete adding a boot image.
|
||||
|
||||
### Deploy the client image
|
||||
|
||||
1. Before using WDS to deploy a client image, you must temporarily disable the external network adapter on SRV1. This is just an artifact of the lab environment. In a typical deployment environment WDS would not be installed on the default gateway. **Note**: Do not disable the *internal* network interface. To disable the *external* interface on SRV1, open a Windows PowerShell prompt on SRV1 and type the following command:
|
||||
|
||||
```
|
||||
Disable-NetAdapter "Ethernet 2" -Confirm:$false
|
||||
```
|
||||
|
||||
2. Next, switch to the Hyper-V host and open an elevated Windows PowerShell prompt. Create a generation 2 VM on the Hyper-V host that will load its OS using PXE. To create this VM, type the following commands at an elevated Windows PowerShell prompt:
|
||||
|
||||
```
|
||||
New-VM –Name "PC2" –NewVHDPath "c:\vhd\pc2.vhdx" -NewVHDSizeBytes 60GB -SwitchName poc-internal -BootDevice NetworkAdapter -Generation 2
|
||||
Set-VMMemory -VMName "PC2" -DynamicMemoryEnabled $true -MinimumBytes 512MB -MaximumBytes 2048MB -Buffer 20
|
||||
```
|
||||
>Dynamic memory is configured on the VM to conserve resources. However, this can cause memory allocation to be reduced past what is required to install an operating system. If this happens, reset the VM and begin the OS installation task sequence immediately. This ensures the VM memory allocation is not decreased too much while it is idle.
|
||||
|
||||
3. Start the new VM and connect to it:
|
||||
|
||||
```
|
||||
Start-VM PC2
|
||||
vmconnect localhost PC2
|
||||
```
|
||||
4. When prompted, hit ENTER to start the network boot process.
|
||||
|
||||
5. Choose the **Windows 10 Enterprise x64 Custom Image** and then click **Next**.
|
||||
|
||||
6. After MDT lite touch installation has started, be sure to re-enable the external network adapter on SRV1. This is needed so the client can use Windows Update after operating system installation is complete.To re-enable the external network interface, open an elevated Windows PowerShell prompt on SRV1 and type the following command:
|
||||
|
||||
```
|
||||
Enable-NetAdapter "Ethernet 2"
|
||||
```
|
||||
7. On SRV1, in the Deployment Workbench console, click on **Monitoring** and view the status of installation.
|
||||
8. When OS installation is complete, the system will reboot automatically and begin configuring devices. When the new client computer is finished updating, click **Finish**. You will be automatically signed in to the local computer as administrator.
|
||||
|
||||
9. Turn off the PC2 VM before starting the next section. To turn off the VM, right-click **Start**, point to **Shut down or sign out**, and then click **Shut down**.
|
||||
|
||||
### Refresh a computer with Windows 10
|
||||
|
||||
This topic will demonstrate how to export user data from an existing client computer, wipe the computer, install a new operating system, and then restore user data and settings. The scenario will use PC1, a computer that was cloned from a physical device to a VM, as described in [Step by step guide: Deploy Windows 10 in a test lab](windows-10-poc.md).
|
||||
|
||||
1. Create a checkpoint for the PC1 VM so that it can easily be reverted to its current state for troubleshooting purposes and to perform additional scenarios. Checkpoints are also known as snapshots. To create a checkpoint for the PC1 VM, type the following command at an elevated Windows PowerShell prompt on the Hyper-V host:
|
||||
```
|
||||
Checkpoint-VM -Name PC1 -SnapshotName BeginState
|
||||
```
|
||||
|
||||
2. Sign on to PC1 using the CONTOSO\Administrator account.
|
||||
|
||||
>Specify **contoso\administrator** as the user name to ensure you do not sign on using the local administrator account. You must sign in with this account so that you have access to the deployment share.
|
||||
|
||||
3. Open an elevated command prompt on PC1 and type the following:
|
||||
|
||||
```
|
||||
cscript \\SRV1\MDTProd$\Scripts\Litetouch.vbs
|
||||
```
|
||||
**Note**: Litetouch.vbs must be able to create the C:\MININT directory on the local computer.
|
||||
|
||||
4. Choose the **Windows 10 Enterprise x64 Custom Image** and then click **Next**.
|
||||
|
||||
5. Choose **Do not back up the existing computer** and click **Next**.
|
||||
|
||||
**Note**: The USMT will still back up the computer.
|
||||
|
||||
6. Lite Touch Installation will perform the following actions:
|
||||
- Back up user settings and data using USMT.
|
||||
- Install the Windows 10 Enterprise X64 operating system.
|
||||
- Update the operating system via Windows Update.
|
||||
- Restore user settings and data using USMT.
|
||||
|
||||
You can review the progress of installation on SRV1 by clicking on the **Monitoring** node in the deployment workbench. When OS installation is complete, the computer will restart, set up devices, and configure settings.
|
||||
|
||||
7. Sign in with the CONTOSO\Administrator account and verify that all CONTOSO domain user accounts and data have been migrated to the new operating system.
|
||||
|
||||
8. Create another checkpoint for the PC1 VM so that you can review results of the computer refresh later. To create a checkpoint, type the following command at an elevated Windows PowerShell prompt on the Hyper-V host:
|
||||
```
|
||||
Checkpoint-VM -Name PC1 -SnapshotName RefreshState
|
||||
```
|
||||
9. Restore the PC1 VM to it's previous state in preparation for the replace procedure. To restore a checkpoint, type the following command at an elevated Windows PowerShell prompt on the Hyper-V host:
|
||||
```
|
||||
Restore-VMSnapshot -VMName PC1 -Name BeginState -Confirm:$false
|
||||
Start-VM PC1
|
||||
vmconnect localhost PC1
|
||||
```
|
||||
10. Sign in to PC1 using the contoso\administrator account.
|
||||
|
||||
### Replace a computer with Windows 10
|
||||
|
||||
At a high level, the computer replace process consists of:<BR>
|
||||
- A special replace task sequence that runs the USMT backup and an optional full Window Imaging (WIM) backup.<BR>
|
||||
- A standard OS deployment on a new computer. At the end of the deployment, the USMT backup from the old computer is restored.
|
||||
|
||||
#### Create a backup-only task sequence
|
||||
|
||||
1. On SRV1, in the deployment workbench console, right-click the MDT Production deployment share, click **Properties**, click the **Rules** tab, and change the line **SkipUserData=YES** to **SkipUserData=NO**.
|
||||
2. Click **OK**, right-click **MDT Production**, click **Update Deployment Share** and accept the default options in the wizard to update the share.
|
||||
3. Type the following commands at an elevated Windows PowerShell prompt on SRV1:
|
||||
```
|
||||
New-Item -Path C:\MigData -ItemType directory
|
||||
New-SmbShare -Name MigData$ -Path C:\MigData -ChangeAccess EVERYONE
|
||||
icacls C:\MigData /grant '"contoso\administrator":(OI)(CI)(M)'
|
||||
```
|
||||
4. On SRV1 in the deployment workbench, under **MDT Production**, right-click the **Task Sequences** node, and click **New Folder**.
|
||||
5. Name the new folder **Other**, and complete the wizard using default options.
|
||||
6. Right-click the **Other** folder and then click **New Task Sequence**. Use the following values in the wizard:
|
||||
- **Task sequence ID**: REPLACE-001
|
||||
- **Task sequence name**: Backup Only Task Sequence
|
||||
- **Task sequence comments**: Run USMT to backup user data and settings
|
||||
- **Template**: Standard Client Replace Task Sequence
|
||||
7. Accept defaults for the rest of the wizard and then click **Finish**. The replace task sequence will skip OS selection and settings.
|
||||
8. Open the new task sequence that was created and review it. Note the type of capture and backup tasks that are present. Click **OK** when you are finished reviewing the task sequence.
|
||||
|
||||
#### Run the backup-only task sequence
|
||||
|
||||
1. If you are not already signed on to PC1 as **contoso\administrator**, sign in using this account. To verify the currently signed in account, type the following command at an elevated command prompt:
|
||||
```
|
||||
whoami
|
||||
```
|
||||
2. To ensure a clean environment before running the backup task sequence, type the following at an elevated Windows PowerShell prompt:
|
||||
```
|
||||
Remove-Item c:\minint -recurse
|
||||
Remove-Item c:\_SMSTaskSequence -recurse
|
||||
Restart-Computer
|
||||
```
|
||||
2. Sign in to PC1 using the contoso\administrator account, and then type the following at an elevated command prompt:
|
||||
```
|
||||
cscript \\SRV1\MDTProd$\Scripts\Litetouch.vbs
|
||||
```
|
||||
3. Complete the deployment wizard using the following:
|
||||
- **Task Sequence**: Backup Only Task Sequence
|
||||
- **User Data**: Specify a location: **\\SRV1\MigData$\PC1**
|
||||
- **Computer Backup**: Do not back up the existing computer.
|
||||
4. While the task sequence is running on PC1, open the deployment workbench console on SRV1 and click the **Monitoring* node. Press F5 to refresh the console, and view the status of current tasks.
|
||||
5. Verify that **The user state capture was completed successfully** is displayed, and click **Finish** when the capture is complete.
|
||||
6. On SRV1, verify that the file **USMT.MIG** was created in the **C:\MigData\PC1\USMT** directory. See the following example:
|
||||
```
|
||||
PS C:\> dir C:\MigData\PC1\USMT
|
||||
|
||||
Directory: C:\MigData\PC1\USMT
|
||||
|
||||
Mode LastWriteTime Length Name
|
||||
---- ------------- ------ ----
|
||||
-a--- 9/6/2016 11:34 AM 14248685 USMT.MIG
|
||||
```
|
||||
#### Deploy PC3
|
||||
|
||||
1. On the Hyper-V host, type the following commands at an elevated Windows PowerShell prompt:
|
||||
```
|
||||
New-VM –Name "PC3" –NewVHDPath "c:\vhd\pc3.vhdx" -NewVHDSizeBytes 60GB -SwitchName poc-internal -BootDevice NetworkAdapter -Generation 2
|
||||
Set-VMMemory -VMName "PC3" -DynamicMemoryEnabled $true -MinimumBytes 512MB -MaximumBytes 2048MB -Buffer 20
|
||||
```
|
||||
2. Temporarily disable the external network adapter on SRV1 again, so that we can successfully boot PC3 from WDS. To disable the adapter, type the following command at an elevated Windows PowerShell prompt on SRV1:
|
||||
```
|
||||
Disable-NetAdapter "Ethernet 2" -Confirm:$false
|
||||
```
|
||||
3. Start and connect to PC3 by typing the following commands at an elevated Windows PowerShell prompt on the Hyper-V host:
|
||||
```
|
||||
Start-VM PC3
|
||||
vmconnect localhost PC3
|
||||
```
|
||||
4. When prompted, press ENTER for network boot.
|
||||
|
||||
6. On PC3, ue the following settings for the Windows Deployment Wizard:
|
||||
- **Task Sequence**: Windows 10 Enterprise x64 Custom Image
|
||||
- **Move Data and Settings**: Do not move user data and settings
|
||||
- **User Data (Restore)**: Specify a location: **\\SRV1\MigData$\PC1**
|
||||
5. When OS installation has started on PC1, re-enable the external network adapter on SRV1 by typing the following command on SRV1:
|
||||
```
|
||||
Enable-NetAdapter "Ethernet 2"
|
||||
```
|
||||
7. Setup will install the Windows 10 Enterprise operating system, update via Windows Update, and restore the user settings and data from PC1.
|
||||
|
||||
#### Troubleshooting logs, events, and utilities
|
||||
|
||||
Deployment logs are available on the client computer in the following locations:
|
||||
- Before the image is applied: X:\MININT\SMSOSD\OSDLOGS
|
||||
- After the system drive has been formatted: C:\MININT\SMSOSD\OSDLOGS
|
||||
- After deployment: %WINDIR%\TEMP\DeploymentLogs
|
||||
|
||||
You can review WDS events in Event Viewer at: **Applications and Services Logs > Microsoft > Windows > Deployment-Services-Diagnostics**. By default, only the **Admin** and **Operational** logs are enabled. To enable other logs, right-click the log and then click **Enable Log**.
|
||||
|
||||
Tools for viewing log files, and to assist with troubleshooting are available in the [System Center 2012 R2 Configuration Manager Toolkit](https://www.microsoft.com/en-us/download/details.aspx?id=50012)
|
||||
|
||||
## Related Topics
|
||||
|
||||
[Microsoft Deployment Toolkit](https://technet.microsoft.com/en-US/windows/dn475741)<BR>
|
||||
[Prepare for deployment with MDT 2013](prepare-for-windows-deployment-with-mdt-2013.md)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,133 +0,0 @@
|
||||
---
|
||||
title: Placeholder (Windows 10)
|
||||
description: Deploy Windows 10 in a test lab using System Center Configuration Manager
|
||||
ms.prod: w10
|
||||
ms.mktglfcycl: deploy
|
||||
ms.sitesec: library
|
||||
ms.pagetype: deploy
|
||||
author: greg-lindsay
|
||||
---
|
||||
|
||||
# Deploy Windows 10 in a test lab using System Center Configuration Manager
|
||||
|
||||
**Applies to**
|
||||
|
||||
- Windows 10
|
||||
|
||||
**Important**: This guide leverages the proof of concept (PoC) environment configured using procedures in [Step by step guide: Deploy Windows 10 in a test lab](windows-10-poc.md). Please complete all steps in the prerequisite guide before attempting the procedures in this guide.
|
||||
|
||||
If you have already completed [Deploy Windows 10 in a test lab using Microsoft Deployment Toolkit](windows-10-poc-mdt.md), you can skip some steps of this guide, such as installation of MDT.
|
||||
|
||||
The PoC environment is a virtual network running on Hyper-V with three virtual machines (VMs):
|
||||
- **DC1**: A contoso.com domain controller, DNS server, and DHCP server.
|
||||
- **SRV1**: A dual-homed contoso.com domain member server, DNS server, and default gateway providing NAT service for the PoC network.
|
||||
- **PC1**: A contoso.com member computer running Windows 7, Windows 8, or Windows 8.1 that has been cloned from a physical computer on your corporate network for testing purposes.
|
||||
|
||||
This guide leverages the Hyper-V server role to perform procedures. If you do not complete all steps in a single session, consider using [checkpoints](https://technet.microsoft.com/library/dn818483.aspx) and [saved states](https://technet.microsoft.com/library/ee247418.aspx) to pause, resume, or restart your work.
|
||||
|
||||
## In this guide
|
||||
|
||||
Description here.
|
||||
|
||||
## Install prerequisites
|
||||
|
||||
1. On SRV1, type the following command at an elevated Windows PowerShell prompt on SRV1 to enable .NET Framework 3.5:
|
||||
```
|
||||
Add-WindowsFeature NET-Framework-Core
|
||||
```
|
||||
2.
|
||||
|
||||
## Install System Center Configuration Manager
|
||||
|
||||
|
||||
2. On SRV1, temporarily disable IE Enhanced Security Configuration for Administrators by typing the following commands at an elevated Windows PowerShell prompt:
|
||||
```
|
||||
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
|
||||
Set-ItemProperty -Path $AdminKey -Name “IsInstalled” -Value 0
|
||||
Stop-Process -Name Explorer
|
||||
```
|
||||
3. Download [System Center Configuration Manager and Endpoint Protection](https://www.microsoft.com/en-us/evalcenter/evaluate-system-center-configuration-manager-and-endpoint-protection) on SRV1, double-click the file, enter **C:\configmgr** for **Unzip to folder**, and click **Unzip**. The directory will be automatically created. Click **OK** and then close the WinZip Self-Extractor dialog box when finished.
|
||||
|
||||
```
|
||||
New-Item -Path c:\setupdl -ItemType Directory
|
||||
New-SmbShare -Name SetupDL$ -Path C:\setupdl -ChangeAccess EVERYONE
|
||||
cmd /c c:\configmgr\SMSSETUP\BIN\X64\setupdl.exe "\\greglin-xps\SetupDL$"
|
||||
|
||||
Install-WindowsFeature Web-Windows-Auth
|
||||
Install-WindowsFeature Web-ISAPI-Ext
|
||||
Install-WindowsFeature Web-Metabase
|
||||
Install-WindowsFeature Web-WMI
|
||||
Install-WindowsFeature BITS
|
||||
Install-WindowsFeature RDC
|
||||
Install-WindowsFeature NET-Framework-Features
|
||||
Install-WindowsFeature Web-Asp-Net
|
||||
Install-WindowsFeature Web-Asp-Net45
|
||||
Install-WindowsFeature NET-HTTP-Activation
|
||||
Install-WindowsFeature NET-Non-HTTP-Activ
|
||||
|
||||
|
||||
```
|
||||
|
||||
OK this is what I need to go with:
|
||||
https://gallery.technet.microsoft.com/ConfigMgr-2012-R2-e52919cd
|
||||
|
||||
Configure it as a primary site, add state migration point, distribution point, extend AD
|
||||
|
||||
After running it I need to install the ADK, and WDS
|
||||
|
||||
To configure SQL I think I have to download SQLEXPR_x64_ENU which is extracted and then run setup to load the install wizard
|
||||
This defaults to NT Service\MSSQL$SQLEXPRESS
|
||||
Windows authentication mode
|
||||
|
||||
configure SQL - using SQL server installation center (?)
|
||||
|
||||
Maybe use a configuration file
|
||||
Maybe use:
|
||||
|
||||
Setup.exe /qs /ACTION=Install /FEATURES=SQLEngine,Replication /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="contoso\administrator" /SQLSVCPASSWORD="pass@word1" /SQLSYSADMINACCOUNTS="contoso\administrator" /AGTSVCACCOUNT="NT AUTHORITY\Network Service" /UpdateEnabled=True /IACCEPTSQLSERVERLICENSETERMS
|
||||
|
||||
.\Setup.exe /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLCOLLATION=SQL_Latin1_General_CP1_CI_AS /SQLSYSADMINACCOUNTS="contoso\administrator" <--- this worked but I probably just need to add /sqlcollation to the first command (install)
|
||||
|
||||
& sc.exe config "$servicename" obj= "[$domain\$username]" password= "[$password] <--- not this
|
||||
|
||||
then run SCCM setup.exe
|
||||
|
||||
Cripes I can't use SQL server express edition.... currently I only have this and the TCP port as failures.
|
||||
SQL server tcp is enabled and set to static port...
|
||||
|
||||
So..
|
||||
I need to download a full version of SQL somewhere
|
||||
Install it with command line, set the port and firewall
|
||||
There seems to be some memory requirement for SQL "Configuration Manager requries SQL server to reserve a minimum of 8 GB of memory for central or primary site... I don't know if this will prevent me from getting it working.
|
||||
|
||||
|
||||
4. To start installation, type the following command at an elevated Windows PowerShell prompt:
|
||||
|
||||
```
|
||||
C:\configmgr\SMSSETUP\BIN\X64\Setup.exe
|
||||
```
|
||||
5. Provide the following in the System Center Configuration Manager Setup Wizard:
|
||||
- **Before You Begin**: Read the text and click *Next*.
|
||||
- **Getting Started**: Choose **Install a Configuration Manager primary site** and select the **Use typical installation options for a stand-alone primary site** checkbox.
|
||||
- Click **Yes** in response to the popup window.
|
||||
- **Product Key**: Choose **Install the evaluation edition of this Product**.
|
||||
- **Microsoft Software License Terms**: Read the terms and then select the I accept these license terms checkbox.
|
||||
- **Prerequisite Licenses**: Review license terms and select all three checkboxes on the page.
|
||||
- **Prerequisite Downloads**: Choose **Download required files** and enter **c:\configmgr** next to **Path**.
|
||||
- **Site and Installation Settings**: Site code: **PS1**, Site name: **Contoso**.
|
||||
- use default settings for all other options
|
||||
- **Usage Data**: Read the text and click **Next**.
|
||||
- **Service Connection Point Setup**: Accept the default settings (SRV1.contoso.com is automatically added under Select a server to use).
|
||||
- **Settings Summary**: Review settings and click **Next**.
|
||||
- **Prerequisite Check**:
|
||||
|
||||
## Related Topics
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,661 +0,0 @@
|
||||
---
|
||||
title: Deploy Windows 10 in a test lab (Windows 10)
|
||||
description: Concepts and procedures for deploying Windows 10 in a proof of concept lab environment.
|
||||
ms.prod: w10
|
||||
ms.mktglfcycl: deploy
|
||||
ms.sitesec: library
|
||||
ms.pagetype: deploy
|
||||
author: greg-lindsay
|
||||
---
|
||||
|
||||
# Step by step guide: Deploy Windows 10 in a test lab
|
||||
|
||||
**Applies to**
|
||||
|
||||
- Windows 10
|
||||
|
||||
If you are interested in upgrading to Windows 10 and want to know more about the upgrade process, then keep reading...
|
||||
|
||||
Do you have a computer running Windows 8 or later with 16GB of RAM? If so, then you have everything you need to set up a Windows 10 test lab. You can even clone computers from your network and see exactly what happens when they are upgraded to Windows 10.
|
||||
|
||||
## In this guide
|
||||
|
||||
This guide provides step-by-step instructions for configuring a proof of concept (PoC) environment where you can deploy Windows 10. The PoC enviroment is configured using Hyper-V and a minimum amount of resources. Simple to use Windows PowerShell commands are provided for setting up the test lab.
|
||||
|
||||
The following topics and procedures are provided in this guide:
|
||||
|
||||
- [Hardware and software requirements](#hardware-and-software-requirements): Prerequisites to complete this guide.<BR>
|
||||
- [Lab setup](#lab-setup): A description and diagram of the PoC environment that is configured.<BR>
|
||||
- [Configure the PoC environment](#configure-the-poc-environment): Step by step guidance for the following procedures:
|
||||
- [Verify support and install Hyper-V](#verify-support-and-install-hyper-v): Verify that installation of Hyper-V is supported, and install the Hyper-V server role.
|
||||
- [Download VHD and ISO files](#download-vhd-and-iso-files): Download evaluation versions of Windows Server 2012 R2 and Windows 10 and prepare these files to be used on the Hyper-V host.
|
||||
- [Convert PC to VHD](#convert-pc-to-vhd): Convert a physical computer on your network to a VHDX file and prepare it to be used on the Hyper-V host.
|
||||
- [Configure Hyper-V](#configure-hyper-v): Create virtual switches, determine available RAM for virtual machines, and add virtual machines.
|
||||
- [Configure VHDs](#configure-vhds): Start virtual machines and configure all services and settings.
|
||||
|
||||
The following optional topics are also available:
|
||||
- [Appendix A: Configuring Hyper-V on Windows Server 2008 R2](#appendix-a-configuring-hyper-v-on-windows-server-2008-r2): Information about using this guide with a Hyper-V host running Windows Server 2008 R2.
|
||||
- [Appendix B: Verify the configuration](#appendix-b-verify-the-configuration): Verify and troubleshoot network connectivity and services in the PoC environment.
|
||||
|
||||
When you have completed the steps in this guide, see the following topics for step by step instructions to deploy Windows 10 using the PoC environment under common scenarios with current deployment tools:
|
||||
|
||||
- [Deploy Windows 10 in a test lab using MDT](windows-10-poc-mdt.md)
|
||||
- [Deploy Windows 10 in a test lab using System Center Configuration Manager](windows-10-poc-sc-config-mgr.md)
|
||||
|
||||
## Hardware and software requirements
|
||||
|
||||
One computer that meets the hardware and software specifications below is required to complete the guide; A second computer is recommended to validate the upgrade process.
|
||||
|
||||
The second computer is used to clone and mirror a client computer (computer 2) from your corporate network to the POC environment. Alternatively, you can use an arbitrary VM to represent this computer, therefore this computer is not required to complete the lab.
|
||||
|
||||
<table border="1" cellpadding="2">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td BGCOLOR="#a0e4fa">**Computer 1** (required)</td>
|
||||
<td BGCOLOR="#a0e4fa">**Computer 2** (recommended)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td BGCOLOR="#a0e4fa">Role</td>
|
||||
<td>Hyper-V host</td>
|
||||
<td>Client computer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td BGCOLOR="#a0e4fa">Description</td>
|
||||
<td>This computer will run Hyper-V, the Hyper-V management tools, and the Hyper-V Windows PowerShell module.</td>
|
||||
<td>This computer is a Windows 7 or Windows 8/8.1 client on your corporate network that will be converted to a VHD for upgrade demonstration purposes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td BGCOLOR="#a0e4fa">OS</td>
|
||||
<td>Windows 8/8.1/10 or Windows Server 2012/2012 R2/2016<B>*</B></td>
|
||||
<td>Windows 7 or a later</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td BGCOLOR="#a0e4fa">Edition</td>
|
||||
<td>Enterprise, Professional, or Education</td>
|
||||
<td>Any</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td BGCOLOR="#a0e4fa">Architecture</td>
|
||||
<td>64-bit</td>
|
||||
<td>Any</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td BGCOLOR="#a0e4fa">RAM</td>
|
||||
<td>8 GB RAM (16 GB recommended)</td>
|
||||
<td>Any</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td BGCOLOR="#a0e4fa">Disk</td>
|
||||
<td>50 GB available hard disk space (100 GB recommended)</td>
|
||||
<td>Any</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td BGCOLOR="#a0e4fa">CPU</td>
|
||||
<td>SLAT-Capable CPU</td>
|
||||
<td>Any</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td BGCOLOR="#a0e4fa">Network</td>
|
||||
<td>Internet connection</td>
|
||||
<td>Any</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
>Retaining applications and settings during the upgrade process requires that architecture (32 or 64-bit) is the same before and after the upgrade.
|
||||
|
||||
<B>*</B>The Hyper-V server role can also be installed on a computer running Windows Server 2008 R2. However, the Windows PowerShell module for Hyper-V is not available on Windows Server 2008 R2, therefore you cannot use many of the steps provided in this guide to configure Hyper-V. The performance and features of the Hyper-V role are also much improved on later operating systems. If your host must be running Windows Server 2008 R2, see [Appendix A: Configuring Hyper-V settings on 2008 R2](#appendix-a-configuring-hyper-v-on-windows-server-2008-r2).
|
||||
|
||||
The Hyper-V role cannot be installed on Windows 7 or earlier versions of Windows.
|
||||
|
||||
## Lab setup
|
||||
|
||||
- The Hyper-V host computer (computer 1) is configured to host four VMs on a private, proof of concept network.
|
||||
- Two VMs are running Windows Server 2012 R2 with required network services and tools installed.
|
||||
- Two VMs are client systems: One VM is intended to mirror a host on your corporate network (computer 2) and one VM is running Windows 10 Enterprise to demonstrate the hardware replacement scenario.
|
||||
- Links are provided to download trial versions of Windows Server 2012, Windows 10 Enterprise, and all deployment tools necessary to complete the lab.
|
||||
|
||||
The lab architecture is summarized in the following diagram:
|
||||
|
||||

|
||||
|
||||
**Note**:
|
||||
>If you have an existing Hyper-V host, you can use this host if desired and skip the Hyper-V installation section in this guide.
|
||||
|
||||
>The two Windows Server VMs can be combined into a single VM to conserve RAM and disk space if required. However, instructions in this guide assume two server systems are used. Using two servers enables Active Directory Domain Services and DHCP to be installed on a server that is not directly connected to the corporate network. This mitigates the risk of clients on the corporate network receiving DHCP leases from the PoC network (i.e. "rogue" DHCP), and limits NETBIOS service broadcasts.
|
||||
|
||||
## Configure the PoC environment
|
||||
|
||||
### Procedures in this section
|
||||
|
||||
[Verify support and install Hyper-V](#verify-support-and-install-hyper-v)<BR>
|
||||
[Download VHD and ISO files](#download-vhd-and-iso-files)<BR>
|
||||
[Configure Hyper-V](#configure-hyper-v)<BR>
|
||||
[Convert PC to VHD](#convert-pc-to-vhd)<BR>
|
||||
[Configure VHDs](#configure-vhds)<BR>
|
||||
|
||||
### Verify support and install Hyper-V
|
||||
|
||||
1. Verify that the computer supports Hyper-V.
|
||||
|
||||
Starting with Windows 8, the host computer’s microprocessor must support second level address translation (SLAT) to install Hyper-V. See [Hyper-V: List of SLAT-Capable CPUs for Hosts](http://social.technet.microsoft.com/wiki/contents/articles/1401.hyper-v-list-of-slat-capable-cpus-for-hosts.aspx) for more information. To verify your computer supports SLAT, open an administrator command prompt, type systeminfo, press ENTER, and review the section displayed at the bottom of the output, next to Hyper-V Requirements.
|
||||
|
||||
See the following example:
|
||||
|
||||
```
|
||||
C:\>systeminfo
|
||||
...
|
||||
Hyper-V Requirements: VM Monitor Mode Extensions: Yes
|
||||
Virtualization Enabled In Firmware: Yes
|
||||
Second Level Address Translation: Yes
|
||||
Data Execution Prevention Available: Yes
|
||||
```
|
||||
In this example, the computer supports SLAT and Hyper-V.
|
||||
|
||||
If one or more requirements are evaluated as "No" then the computer does not support installing Hyper-V. However, if only the virtualization setting is incompatible, you might be able to enable virtualization in the BIOS and change the "Virtualization Enabled In Firmware" setting from "No" to "Yes." The location of this setting will depend on the manufacturer and BIOS version, but is typically found associated with the BIOS security settings.
|
||||
|
||||
You can also identify Hyper-V support using [tools](https://blogs.msdn.microsoft.com/taylorb/2008/06/19/hyper-v-will-my-computer-run-hyper-v-detecting-intel-vt-and-amd-v/) provided by the processor manufacturer, the [msinfo32](https://technet.microsoft.com/en-us/library/cc731397.aspx) tool, or you can download the [coreinfo](http://technet.microsoft.com/en-us/sysinternals/cc835722) utility and run it, as shown in the following example:
|
||||
|
||||
```
|
||||
C:\>coreinfo -v
|
||||
|
||||
Coreinfo v3.31 - Dump information on system CPU and memory topology
|
||||
Copyright (C) 2008-2014 Mark Russinovich
|
||||
Sysinternals - www.sysinternals.com
|
||||
|
||||
Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
|
||||
Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
|
||||
Microcode signature: 0000001B
|
||||
HYPERVISOR - Hypervisor is present
|
||||
VMX * Supports Intel hardware-assisted virtualization
|
||||
EPT * Supports Intel extended page tables (SLAT)
|
||||
```
|
||||
|
||||
Note: A 64-bit operating system is requried to run Hyper-V.
|
||||
|
||||
2. Enable Hyper-V.
|
||||
|
||||
The Hyper-V feature is not installed by default. To install it, open an elevated Windows PowerShell window and type the following command:
|
||||
|
||||
```
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All
|
||||
```
|
||||
When you are prompted to restart the computer, choose Yes. The computer might restart more than once.
|
||||
|
||||
You can also install Hyper-V using the Control Panel in Windows under **Turn Windows features on or off** (client OS), or using Server Manager's **Add Roles and Features Wizard** (server OS), as shown below:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### Download VHD and ISO files
|
||||
|
||||
1. Create a directory on your Hyper-V host named C:\VHD and download a single [Windows Server 2012 R2 VHD](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2012-r2) from the TechNet Evaluation Center to the C:\VHD directory.
|
||||
|
||||
**Important**: This guide assumes that VHDs are stored in the **C:\VHD** directory on the Hyper-V host. If you use a different directory to store VHDs, you must adjust steps in this guide appropriately.
|
||||
|
||||
After completing registration you will be able to download the 7.47 GB Windows Server 2012 R2 evaluation VHD.
|
||||
|
||||

|
||||
|
||||
2. Rename the VHD file that you downloaded to **2012R2-poc-1.vhd**. This is not required, but is done to make the filename simpler to recognize.
|
||||
3. Copy the VHD to a second file also in the C:\VHD directory and name this VHD **2012R2-poc-2.vhd**.
|
||||
4. Download the [Windows 10 Enterprise ISO](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-10-enterprise) from the TechNet Evaluation Center to the C:\VHD directory on your Hyper-V host. During registration, you must specify the type, version, and language of installation media to download. In this example, a Windows 10 Enterprise, 64 bit, English VHD is chosen. You can choose a different version if desired. Note that Windows 10 in-place upgrade is only possible if the source operating system and installation media are both 32-bit or both 64-bit, so you should download the file version that corresponds to the version of your source computer for upgrade testing.
|
||||
5. Rename the ISO file that you downloaded to **w10-enterprise.iso**. Again, this is done so that the filename is simpler to type and recognize. After completing registration you will be able to download the 3.63 GB Windows 10 Enterprise evaluation ISO.
|
||||
|
||||
The following commands and output display the procedures described in this section:
|
||||
|
||||
```
|
||||
C:\>mkdir VHD
|
||||
|
||||
C:\>cd VHD
|
||||
|
||||
C:\VHD>ren 9600*.vhd 2012R2-poc-1.vhd
|
||||
|
||||
C:\VHD>copy 2012R2-poc-1.vhd 2012R2-poc-2.vhd
|
||||
1 file(s) copied.
|
||||
|
||||
C:\VHD ren *.iso w10-enterprise.iso
|
||||
C:\VHD>dir /B
|
||||
2012R2-poc-1.vhd
|
||||
2012R2-poc-2.vhd
|
||||
w10-enterprise.iso
|
||||
```
|
||||
|
||||
### Convert PC to VHD
|
||||
|
||||
**Important**:Before you convert a PC to VHD, verify that you have access to a local administrator account on the computer. Alternatively you can use a domain account with administrative rights if these credentials are cached on the computer and your domain policy allows the use of cached credentials for login.
|
||||
|
||||
>For purposes of the test lab, you must use a PC with a single hard drive that is assigned a drive letter of C:. Systems with multiple hard drives or non-standard configurations can also be upgraded using PC refresh and replace scenarios, but these systems require more advanced deployment task sequences than those used in this lab.
|
||||
|
||||
1. Download the [Disk2vhd utility](https://technet.microsoft.com/en-us/library/ee656415.aspx), extract the .zip file and copy disk2vhd.exe to a flash drive or other location that is accessible from the computer you wish to convert.
|
||||
>Note: You might experience timeouts if you attempt to run Disk2vhd from a network share, or specify a network share for the destination. To avoid timeouts, use local, portable media.
|
||||
2. On the computer you wish to convert, double-click the disk2vhd utility to start the graphical user interface.
|
||||
3. Select checkboxes next to the volumes you wish to copy and specify a location to save the resulting VHD or VHDX file. If your Hyper-V host is running Windows Server 2008 R2 you must choose VHD, otherwise choose VHDX.
|
||||
4. Click **Create** to start creating a VHDX file.
|
||||
|
||||
>Disk2vhd can save VHDs to local hard drives, even if they are the same as the volumes being converted. Performance is better however when the VHD is saved on a disk different than those being converted, such as a flash drive.
|
||||
|
||||
5. When the Disk2vhd utility has completed converting the source computer to a VHD, copy the VHDX file (w7.vhdx) to your Hyper-V host in the C:\VHD directory. There should now be four files in this directory:
|
||||
|
||||
```
|
||||
C:\vhd>dir /B
|
||||
2012R2-poc-1.vhd
|
||||
2012R2-poc-2.vhd
|
||||
w10-enterprise.iso
|
||||
w7.VHDX
|
||||
```
|
||||
|
||||
### Configure Hyper-V
|
||||
|
||||
Note: The Hyper-V Windows PowerShell module is not available on Windows Server 2008 R2. For more information, see [Appendix A: Configuring Hyper-V settings on 2008 R2](#appendix-a-configuring-hyper-v-on-windows-server-2008-r2).
|
||||
|
||||
**Important**:You should take advantage of [enhanced session mode](https://technet.microsoft.com/windows-server-docs/compute/hyper-v/learn-more/Use-local-resources-on-Hyper-V-virtual-machine-with-VMConnect) when completing instructions in this guide. Enhanced session mode enables you to copy and paste the commands. After copying some text, you can paste into a Windows PowerShell window by simply right-clicking. Before right-clicking, do not left click other locations as this can empty the clipboard. You can also copy and paste files directly from one computer to another by right-clicking and selecting copy, then right-clicking and selecting paste.
|
||||
|
||||
Instructions to "type" commands provided in this guide can be typed, but in most cases the preferred method is to copy and paste these commands.
|
||||
|
||||
1. Open an elevated Windows PowerShell window and type the following command to create two virtual switches named "poc-internal" and "poc-external":
|
||||
>If the Hyper-V host already has an external virtual switch bound to a physical NIC, do not attempt to add a second external virtual switch. Attempting to add a second external switch will result in an error indicating that the NIC is "**already bound to the Microsoft Virtual Switch protocol.**" In this case, choose one of the following options:<BR>
|
||||
a) Remove the existing external virtual switch, then add the poc-external switch<BR>
|
||||
b) Rename the existing external switch to "poc-external"<BR>
|
||||
c) Replace each instance of "poc-external" used in this guide with the name of your existing external virtual switch<BR>
|
||||
If you choose b) or c), then do not run the second command below.
|
||||
|
||||
```
|
||||
New-VMSwitch -Name poc-internal -SwitchType Internal -Notes "PoC Network"
|
||||
New-VMSwitch -Name poc-external -NetAdapterName (Get-NetAdapter |?{$_.Status -eq "Up" -and $_.NdisPhysicalMedium -eq 14}).Name -Notes "PoC External"
|
||||
```
|
||||
>Also, since an external virtual switch is associated to a physical network adapter on the Hyper-V host, this adapter must be specified when adding the virtual switch. This is automated in the example here by filtering for active ethernet adapters using the Get-NetAdapter cmdlet. If your Hyper-V host has multiple active ethernet adapters, this automation will not work, and the second command above will fail. In this case, you must edit the command used to add the "poc-external" virtual switch by inserting the specific value needed for the -NetAdapterName option. This value corresponds to the name of the network interface you wish to use.
|
||||
|
||||
2. At the elevated Windows PowerShell prompt, type the following command to determine the megabytes of RAM that are currently available on the Hyper-V host:
|
||||
|
||||
```
|
||||
(Get-Counter -Counter @("\Memory\Available MBytes")).countersamples.cookedvalue
|
||||
```
|
||||
>This command will display the megabytes of RAM available. On a Hyper-V host computer with 16 GB of physical RAM installed, 12,000 MB of RAM or greater should be available if the computer is not also running other applications. If the computer has less than 12,000 MB of available RAM, try closing applications to free up more memory.
|
||||
|
||||
3. Determine the available memory for VMs by dividing the available RAM by 4. For example:
|
||||
|
||||
```
|
||||
(Get-Counter -Counter @("\Memory\Available MBytes")).countersamples.cookedvalue/4
|
||||
2775.5
|
||||
```
|
||||
In this example, VMs can use a maximum of 2700 MB of RAM each, to run four VMs simultaneously.
|
||||
|
||||
4. At the elevated Windows PowerShell prompt, type the following command to create three new VMs. The fourth VM will be added later.
|
||||
>**Important**: Replace the value of 2700MB in the first command below with the RAM value that you calculated in the previous step:
|
||||
|
||||
```
|
||||
$maxRAM = 2700MB
|
||||
New-VM –Name "DC1" –VHDPath c:\vhd\2012R2-poc-1.vhd -SwitchName poc-internal
|
||||
Set-VMMemory -VMName "DC1" -DynamicMemoryEnabled $true -MinimumBytes 512MB -MaximumBytes $maxRAM -Buffer 20
|
||||
Enable-VMIntegrationService –Name "Guest Service Interface" -VMName DC1
|
||||
New-VM –Name "SRV1" –VHDPath c:\vhd\2012R2-poc-2.vhd -SwitchName poc-internal
|
||||
Add-VMNetworkAdapter -VMName "SRV1" -SwitchName "poc-external"
|
||||
Set-VMMemory -VMName "SRV1" -DynamicMemoryEnabled $true -MinimumBytes 512MB -MaximumBytes $maxRAM -Buffer 20
|
||||
Enable-VMIntegrationService –Name "Guest Service Interface" -VMName SRV1
|
||||
New-VM –Name "PC1" –VHDPath c:\vhd\w7.vhdx -SwitchName poc-internal
|
||||
Set-VMMemory -VMName "PC1" -DynamicMemoryEnabled $true -MinimumBytes 512MB -MaximumBytes $maxRAM -Buffer 20
|
||||
Enable-VMIntegrationService –Name "Guest Service Interface" -VMName PC1
|
||||
```
|
||||
### Configure VHDs
|
||||
|
||||
1. At an elevated Windows PowerShell prompt on the Hyper-V host, start the first VM by typing the following command:
|
||||
|
||||
```
|
||||
Start-VM DC1
|
||||
```
|
||||
2. Wait for the VM to complete starting up, and then connect to it either using the Hyper-V Manager console (virtmgmt.msc) or using an elevated command prompt on the Hyper-V host:
|
||||
|
||||
```
|
||||
vmconnect localhost DC1
|
||||
```
|
||||
3. Click **Next** to accept the default settings, read the license terms and click **I accept**, provide an administrator password of **pass@word1**, and click **Finish**.
|
||||
4. Sign in to DC1 using the local administrator account. Right-click **Start**, point to **Shut down or sign out**, and click **Sign out**. The VM connection will reset and a new connection dialog box will appear enabling you to choose a custom display configuration. Select a desktop size, click **Connect** and sign in with the local Administrator account. Note: Signing in this way ensures that [enhanced session mode](https://technet.microsoft.com/windows-server-docs/compute/hyper-v/learn-more/Use-local-resources-on-Hyper-V-virtual-machine-with-VMConnect) is enabled. It is only necessary to do this the first time you sign in to a new VM.
|
||||
5. If DC1 is configured as described in this guide, it will currently be assigned an APIPA address, have a randomly generated hostname, and a single network adapter named "Ethernet." Open an elevated Windows PowerShell prompt on DC1 and type or paste the following commands to provide a new hostname and configure a static IP address and gateway:
|
||||
|
||||
```
|
||||
Rename-Computer DC1
|
||||
New-NetIPAddress –InterfaceAlias Ethernet –IPAddress 192.168.0.1 –PrefixLength 24 -DefaultGateway 192.168.0.2
|
||||
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses 192.168.0.1,192.168.0.2
|
||||
```
|
||||
>The default gateway at 192.168.0.2 will be configured later in this guide.
|
||||
6. Install the Active Directory Domain Services role by typing the following command at an elevated Windows PowerShell prompt:
|
||||
|
||||
```
|
||||
Install-WindowsFeature -Name AD-Domain-Services -IncludeAllSubFeature -IncludeManagementTools
|
||||
```
|
||||
|
||||
7. Before promoting DC1 to a Domain Controller, you must reboot so that the name change in step 3 above takes effect. To restart the computer, type the following command at an elevated Windows PowerShell prompt:
|
||||
|
||||
```
|
||||
Restart-Computer
|
||||
```
|
||||
|
||||
8. When DC1 has rebooted, sign in again and open an elevated Windows PowerShell prompt. Now you can promote the server to be a domain controller. The directory services restore mode password must be entered as a secure string:
|
||||
|
||||
```
|
||||
$pass = "pass@word1" | ConvertTo-SecureString -AsPlainText -Force
|
||||
Install-ADDSForest -DomainName contoso.com -InstallDns -SafeModeAdministratorPassword $pass -Force
|
||||
```
|
||||
Ignore any warnings that are displayed. The computer will automatically reboot upon completion.
|
||||
9. When the reboot has completed, reconnect to DC1, sign in using the CONTOSO\Administrator account, open an elevated Windows PowerShell prompt, and use the following commands to add a reverse lookup zone for the PoC network, add the DHCP Server role, authorize DHCP in Active Directory, and supress the post-DHCP-install alert:
|
||||
|
||||
```
|
||||
Add-DnsServerPrimaryZone -NetworkID "192.168.0.0/24" -ReplicationScope Forest
|
||||
Add-WindowsFeature -Name DHCP -IncludeManagementTools
|
||||
netsh dhcp add securitygroups
|
||||
Restart-Service DHCPServer
|
||||
Add-DhcpServerInDC dc1.contoso.com 192.168.0.1
|
||||
Set-ItemProperty –Path registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ServerManager\Roles\12 –Name ConfigurationState –Value 2
|
||||
```
|
||||
10. Next, add a DHCP scope and set option values:
|
||||
|
||||
```
|
||||
Add-DhcpServerv4Scope -Name "PoC Scope" -StartRange 192.168.0.100 -EndRange 192.168.0.199 -SubnetMask 255.255.255.0 -Description "Windows 10 PoC" -State Active
|
||||
Set-DhcpServerv4OptionValue -ScopeId 192.168.0.0 -DnsDomain contoso.com -Router 192.168.0.2 -DnsServer 192.168.0.1,192.168.0.2 -Force
|
||||
```
|
||||
>The -Force option is necessary when adding scope options to skip validation of 192.168.0.2 as a DNS server because we have not configured it yet. The scope should immediately begin issuing leases on the PoC network. The first DHCP lease that will be issued is to vEthernet interface on the Hyper-V host, which is a member of the internal network.
|
||||
11. Add a user account to the contoso.com domain that can be used with client computers:
|
||||
|
||||
```
|
||||
New-ADUser -Name "User1" -UserPrincipalName user1 -AccountPassword (ConvertTo-SecureString "pass@word1" -AsPlainText -Force) -ChangePasswordAtLogon $false -Enabled $true
|
||||
```
|
||||
12. The DNS server role will also be installed on the member server, SRV1, at 192.168.0.2 so that we can forward DNS queries from DC1 to SRV1 to resolve Internet names without having to configure a forwarder outside the PoC network. Since the IP address of SRV1 already existed on DC1's network adapter, it will be automatically added during the DCPROMO process. To verify this server-level DNS forwarder on DC1, type the following command at an elevated Windows PowerShell prompt on DC1:
|
||||
|
||||
```
|
||||
Get-DnsServerForwarder
|
||||
```
|
||||
The following output should be displayed:
|
||||
```
|
||||
UseRootHint : True
|
||||
Timeout(s) : 3
|
||||
EnableReordering : True
|
||||
IPAddress : 192.168.0.2
|
||||
ReorderedIPAddress : 192.168.0.2
|
||||
```
|
||||
If this output is not displayed, you can use the following command to add SRV1 as a forwarder:
|
||||
```
|
||||
Add-DnsServerForwarder -IPAddress 192.168.0.2
|
||||
```
|
||||
13. Minimize the DC1 VM window but **do not stop** the VM.
|
||||
|
||||
Next, the client VM will be started and joined to the contoso.com domain. This is done before adding a gateway to the PoC network so that there is no danger of duplicate DNS registrations for the physical client and its cloned VM in the corporate domain.
|
||||
|
||||
14. Using an elevated Windows PowerShell prompt on the Hyper-V host, start the client VM (PC1), and connect to it:
|
||||
```
|
||||
Start-VM PC1
|
||||
vmconnect localhost PC1
|
||||
```
|
||||
15. Sign on to PC1 using an account that has local administrator rights.
|
||||
|
||||
>PC1 will be disconnected from its current domain, so you cannot use a domain account to sign on unless these credentials are cached and the use of cached credentials is permitted by Group Policy. If cached credentials are available and permitted, you can use these credentials to sign in. Otherwise, use an existing local administrator account.
|
||||
16. After signing in, the operating system detects that it is running in a new environment. New drivers will be automatically installed, including the network adapter driver. The network adapter driver must be updated before you can proceed, so that you will be able to join the contoso.com domain. Depending on the resources allocated to PC1, installing the network adapter driver might take a few minutes.
|
||||
|
||||

|
||||
|
||||
>If the client was configured with a static address, you must change this to a dynamic one so that it can obtain a DHCP lease.
|
||||
|
||||
17. When the new network adapter driver has completed installation, you will receive an alert to set a network location for the contoso.com network. Select **Work network** and then click **Close**. When you receive an alert that a restart is required, click **Restart Later**.
|
||||
18. Open an elevated Windows PowerShell prompt on PC1 and verify that the client VM has received a DHCP lease and can communicate with the consoto.com domain controller.
|
||||
|
||||
To open Windows PowerShell on Windows 7, click **Start**, and search for "**power**."
|
||||
|
||||
```
|
||||
ipconfig
|
||||
|
||||
Windows IP Configuration
|
||||
|
||||
Ethernet adapter Local Area Connection 3:
|
||||
Connection-specific DNS Suffix . : contoso.com
|
||||
Link-local IPv6 Address . . . . . : fe80::64c2:4d2a:7403:6e02%18
|
||||
Ipv4 Address. . . . . . . . . . . : 192.168.0.101
|
||||
Subnet Mask . . . . . . . . . . . : 255.255.255.0
|
||||
Default Gateway . . . . . . . . . : 192.168.0.2
|
||||
|
||||
ping dc1.contoso.com
|
||||
|
||||
Pinging dc1.contoso.com [192.168.0.1] with 32 bytes of data:
|
||||
Reply from 192.168.0.1: bytes=32 time<1ms TTL=128
|
||||
Reply from 192.168.0.1: bytes=32 time<1ms TTL=128
|
||||
Reply from 192.168.0.1: bytes=32 time<1ms TTL=128
|
||||
Reply from 192.168.0.1: bytes=32 time<1ms TTL=128
|
||||
|
||||
nltest /dsgetdc:contoso.com
|
||||
DC: \\DC1
|
||||
Address: \\192.168.0.1
|
||||
Dom Guid: fdbd0643-d664-411b-aea0-fe343d7670a8
|
||||
Dom Name: CONTOSO
|
||||
Forest Name: contoso.com
|
||||
Dc Site Name: Default-First-Site-Name
|
||||
Our Site Name: Default-First-Site-Name
|
||||
Flags: PDC GC DS LDAP KDC TIMESERV WRITABLE DNS_FOREST CLOSE_SITE FULL_SECRET WS 0xC000
|
||||
```
|
||||
>If PC1 is running Windows 7, enhanced session mode is not available, which means that you cannot copy and paste commands from the Hyper-V host to a Windows PowerShell prompt on PC1. However, it is possible to use integration services to copy a file from the Hyper-V host to a VM. The next procedure demonstrates this. If the Copy-VMFile command fails, then type the commands below at an elevated Windows PowerShell prompt on PC1 instead of saving them to a script to run remotely. If PC1 is running Windows 8 or a later operating system, you can use enhanced session mode to copy and paste these commands instead of typing them.
|
||||
|
||||
19. Open an elevated Windows PowerShell ISE window on the Hyper-V host and type the following commands in the (upper) script editor pane:
|
||||
|
||||
```
|
||||
(Get-WmiObject Win32_ComputerSystem).UnjoinDomainOrWorkgroup($null,$null,0)
|
||||
$pass = "pass@word1" | ConvertTo-SecureString -AsPlainText -Force
|
||||
$user = "contoso\administrator"
|
||||
$cred = New-Object System.Management.Automation.PSCredential($user,$pass)
|
||||
Add-Computer -DomainName contoso.com -Credential $cred
|
||||
Restart-Computer
|
||||
```
|
||||
20. Click **File**, click **Save As**, and save the commands as **c:\VHD\ps1.ps1** on the Hyper-V host.
|
||||
21. In the (lower) terminal input window, type the following command to copy the script to PC1 using integration services:
|
||||
|
||||
```
|
||||
Copy-VMFile "PC1" –SourcePath "C:\VHD\pc1.ps1" –DestinationPath "C:\pc1.ps1" –CreateFullPath –FileSource Host
|
||||
```
|
||||
>In order for this command to work properly, PC1 must be running the vmicguestinterface (Hyper-V Guest Service Interface) service.
|
||||
22. On PC1, type the following commands at an elevated Windows PowerShell prompt:
|
||||
|
||||
```
|
||||
Get-Content c:\pc1.ps1 | powershell.exe -noprofile -
|
||||
```
|
||||
|
||||
>PC1 is removed from its domain in this step while not connected to the corporate network so as to ensure the computer object in the corporate domain is unaffected. We have not also renamed PC1 to "PC1" in system properties so that it maintains some of its mirrored identity. However, if desired you can also rename the computer.
|
||||
|
||||
23. After PC1 restarts, sign in to the contoso.com domain with the (user1) account you created in step 11 of this section.
|
||||
>The settings that will be used to migrate user data specifically select only accounts that belong to the CONTOSO domain. If you wish to test migration of user data and settings with an account other than the user1 account, you must copy this account's profile to the user1 profile.
|
||||
24. Minimize the PC1 window but do not turn it off while the second Windows Server 2012 R2 VM (SRV1) is configured. This verifies that the Hyper-V host has enough resources to run all VMs simultaneously. Next, SRV1 will be started, joined to the contoso.com domain, and configured with RRAS and DNS services.
|
||||
25. On the Hyper-V host computer, at an elevated Windows PowerShell prompt, type the following commands:
|
||||
|
||||
```
|
||||
Start-VM SRV1
|
||||
vmconnect localhost SRV1
|
||||
```
|
||||
26. Accept the default settings, read license terms and accept them, provide an administrator password of **pass@word1**, and click **Finish**. When you are prompted about finding PCs, devices, and content on the network, click **Yes**.
|
||||
27. Sign in to SRV1 using the local administrator account. In the same way that was done on DC1, sign out of SRV1 and then sign in again to enable enhanced session mode. This will enable you to copy and paste Windows PowerShell commands from the Hyper-V host to the VM.
|
||||
28. Open an elevated Windows PowerShell prompt on SRV1 and type the following commands:
|
||||
|
||||
```
|
||||
Rename-Computer SRV1
|
||||
New-NetIPAddress –InterfaceAlias Ethernet –IPAddress 192.168.0.2 –PrefixLength 24
|
||||
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses 192.168.0.1,192.168.0.2
|
||||
Restart-Computer
|
||||
```
|
||||
29. Wait for the computer to restart, then type or paste the following commands at an elevated Windows PowerShell prompt:
|
||||
|
||||
```
|
||||
$pass = "pass@word1" | ConvertTo-SecureString -AsPlainText -Force
|
||||
$user = "contoso\administrator"
|
||||
$cred = New-Object System.Management.Automation.PSCredential($user,$pass)
|
||||
Add-Computer -DomainName contoso.com -Credential $cred
|
||||
Restart-Computer
|
||||
```
|
||||
30. Sign in to the contoso.com domain on SRV1 using the domain administrator account (enter contoso\administrator as the user), open an elevated Windows PowerShell prompt, and type the following commands:
|
||||
|
||||
```
|
||||
Install-WindowsFeature -Name DNS -IncludeManagementTools
|
||||
Install-WindowsFeature -Name WDS -IncludeManagementTools
|
||||
Install-WindowsFeature -Name Routing -IncludeManagementTools
|
||||
```
|
||||
31. Before configuring the routing service that was just installed, verify that network interfaces were added to SRV1 in the right order, resulting in an interface alias of "Ethernet" for the private interface, and an interface alias of "Ethernet 2" for the public interface. Also verify that the external interface has a valid external DHCP IP address lease.
|
||||
|
||||
To view a list of interfaces and their associated interface aliases on the VM, use the following Windows PowerShell command. Example output of the command is also shown below:
|
||||
|
||||
```
|
||||
Get-NetAdapter | ? status -eq ‘up’ | Get-NetIPAddress -AddressFamily IPv4 | ft IPAddress, InterfaceAlias
|
||||
|
||||
IPAddress InterfaceAlias
|
||||
--------- --------------
|
||||
10.137.130.118 Ethernet 2
|
||||
192.168.0.2 Ethernet
|
||||
```
|
||||
In this example, the poc-internal network interface at 192.168.0.2 is associated with the "Ethernet" interface and the Internet-facing poc-external interface is associated with the "Ethernet 2" interface. If your interfaces are different, you must adjust the commands provided in the next step appropriately to configure routing services.
|
||||
|
||||
32. To configure SRV1 with routing capability for the PoC network, type or paste the following commands at an elevated Windows PowerShell prompt on SRV1:
|
||||
|
||||
```
|
||||
Install-RemoteAccess -VpnType Vpn
|
||||
cmd /c netsh routing ip nat install
|
||||
cmd /c netsh routing ip nat add interface name="Ethernet 2" mode=FULL
|
||||
cmd /c netsh routing ip nat add interface name="Ethernet" mode=PRIVATE
|
||||
cmd /c netsh routing ip nat add interface name="Internal" mode=PRIVATE
|
||||
```
|
||||
33. The DNS service on SRV1 also needs to resolve hosts in the contoso.com domain. This can be accomplished with a conditional forwarder. Open an elevated Windows PowerShell prompt on SRV1 and type the following command:
|
||||
|
||||
```
|
||||
Add-DnsServerConditionalForwarderZone -Name contoso.com -MasterServers 192.168.0.1
|
||||
```
|
||||
34. In most cases, this completes configuration of the PoC network. However, if your corporate network has a firewall that filters queries from local DNS servers, you will also need to configure a server-level DNS forwarder on SRV1 to resolve Internet names. To test whether or not DNS is working without this forwarder, try to reach a name on the Internet from DC1 or PC1, which are only using DNS services on the PoC network. You can test DNS with the ping command, for example:
|
||||
|
||||
```
|
||||
ping www.microsoft.com
|
||||
```
|
||||
If you see "Ping request could not find host www.microsoft.com" on PC1 and DC1, but not on SRV1, then you will need to configure a server-level DNS forwarder on SRV1. To do this, open an elevated Windows PowerShell prompt on SRV1 and type the following command.
|
||||
|
||||
**Note**: This command also assumes that "Ethernet 2" is the external-facing network adapter on SRV1. If the external adapter has a different name, replace "Ethernet 2" in the command below with that name:
|
||||
|
||||
```
|
||||
Add-DnsServerForwarder -IPAddress (Get-DnsClientServerAddress -InterfaceAlias "Ethernet 2").ServerAddresses
|
||||
```
|
||||
35. If DNS and routing are both working correctly, you will see the following on DC1 and PC1:
|
||||
|
||||
```
|
||||
PS C:\> ping www.microsoft.com
|
||||
|
||||
Pinging e2847.dspb.akamaiedge.net [23.222.146.170] with 32 bytes of data:
|
||||
Reply from 23.222.146.170: bytes=32 time=3ms TTL=51
|
||||
Reply from 23.222.146.170: bytes=32 time=2ms TTL=51
|
||||
Reply from 23.222.146.170: bytes=32 time=2ms TTL=51
|
||||
Reply from 23.222.146.170: bytes=32 time=1ms TTL=51
|
||||
|
||||
Ping statistics for 23.222.146.170:
|
||||
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
|
||||
Approximate round trip times in milli-seconds:
|
||||
Minimum = 1ms, Maximum = 3ms, Average = 2ms
|
||||
```
|
||||
36. Verify that all three VMs can reach each other, and the Internet. See [Appendix B: Verify the configuration](#appendix-b-verify-the-configuration) for more information.
|
||||
37. Lastly, because the client computer has different hardware after copying it to a VM, its Windows activation will be invalidated and you might receive a message that you must activate Windows in 3 days. To extend this period to 30 days, type the following commands at an elevated Windows PowerShell prompt on PC1:
|
||||
|
||||
```
|
||||
slmgr -rearm
|
||||
Restart-Computer
|
||||
```
|
||||
|
||||
## Appendix A: Configuring Hyper-V on Windows Server 2008 R2
|
||||
|
||||
If your Hyper-V host is running Windows Server 2008 R2, several of the steps in this guide will not work because they use the Hyper-V Module for Windows PowerShell, which is not available on Windows Server 2008 R2.
|
||||
|
||||
To manage Hyper-V on Windows Server 2008 R2, you can use Hyper-V WMI, or you can use the Hyper-V Manager console.
|
||||
|
||||
An example that uses Hyper-V WMI to create a virtual switch on Windows Server 2008 R2 is provided below. Converting all Hyper-V module commands used in this guide to Hyper-V WMI is beyond the scope of the guide. If you must use a Hyper-V host running Windows Server 2008 R2, the steps in the guide can be accomplished by using the Hyper-V Manager console.
|
||||
|
||||
```
|
||||
$SwitchFriendlyName = "poc-internal"
|
||||
$InternalEthernetPortFriendlyName = $SwitchFriendlyName
|
||||
$InternalSwitchPortFriendlyName = "poc"
|
||||
$SwitchName = [guid]::NewGuid().ToString()
|
||||
$InternalSwitchPortName = [guid]::NewGuid().ToString()
|
||||
$InternalEthernetPortName = [guid]::NewGuid().ToString()
|
||||
$NumLearnableAddresses = 1024
|
||||
$ScopeOfResidence = ""
|
||||
$VirtualSwitchManagementService = gwmi Msvm_VirtualSwitchManagementService -namespace "root\virtualization"
|
||||
$Result = $VirtualSwitchManagementService.CreateSwitch($SwitchName, $SwitchFriendlyName, $NumLearnableAddresses, $ScopeOfResidence)
|
||||
$Switch = [WMI]$Result.CreatedVirtualSwitch
|
||||
$Result = $VirtualSwitchManagementService.CreateSwitchPort($Switch, $InternalSwitchPortName, $InternalSwitchPortFriendlyName, $ScopeOfResidence)
|
||||
$InternalSwitchPort = [WMI]$Result.CreatedSwitchPort
|
||||
$Result = $VirtualSwitchManagementService.CreateInternalEthernetPortDynamicMac($InternalEthernetPortName, $InternalEthernetPortFriendlyName)
|
||||
$InternalEthernetPort = [WMI]$Result.CreatedInternalEthernetPort
|
||||
$query = "Associators of {$InternalEthernetPort} Where ResultClass=CIM_LanEndpoint"
|
||||
$InternalLanEndPoint = gwmi -namespace root\virtualization -query $query
|
||||
$Result = $VirtualSwitchManagementService.ConnectSwitchPort($InternalSwitchPort, $InternalLanEndPoint)
|
||||
$filter = "SettingID='" + $InternalEthernetPort.DeviceID +"'"
|
||||
$NetworkAdapterConfiguration = gwmi Win32_NetworkAdapterConfiguration -filter $filter
|
||||
```
|
||||
To install Hyper-V on Windows Server 2008 R2, you can use the Add-WindowsFeature cmdlet:
|
||||
|
||||
```
|
||||
Add-WindowsFeature -Name Hyper-V
|
||||
```
|
||||
For more information about the Hyper-V Manager interface in Windows Server 2008 R2, see [Hyper-V](https://technet.microsoft.com/library/cc730764.aspx) in the Windows Server TechNet Library.
|
||||
|
||||
## Appendix B: Verify the configuration
|
||||
|
||||
Use the following procedures to verify that the PoC environment is configured properly and working as expected.
|
||||
|
||||
1. On DC1, open an elevated Windows PowerShell prompt and type the following commands:
|
||||
|
||||
```
|
||||
Get-Service NTDS,DNS,DHCP
|
||||
DCDiag -a
|
||||
Get-DnsServerResourceRecord -ZoneName contoso.com -RRType A
|
||||
Get-DnsServerForwarder
|
||||
Resolve-DnsName -Server dc1.contoso.com -Name www.microsoft.com
|
||||
Get-DhcpServerInDC
|
||||
Get-DhcpServerv4Statistics
|
||||
ipconfig /all
|
||||
```
|
||||
**Get-Service** displays a status of "Running" for all three services.<BR>
|
||||
**DCDiag** displays "passed test" for all tests.<BR>
|
||||
**Get-DnsServerResourceRecord** displays the correct DNS address records for DC1, SRV1, and the computername of PC1. Additional address records for the zone apex (@), DomainDnsZones, and ForestDnsZones will also be registered.<BR>
|
||||
**Get-DnsServerForwarder** displays a single forwarder of 192.168.0.2.<BR>
|
||||
**Resolve-DnsName** displays public IP address results for www.microsoft.com.<BR>
|
||||
**Get-DhcpServerInDC** displays 192.168.0.1, dc1.contoso.com.<BR>
|
||||
**Get-DhcpServerv4Statistics** displays 1 scope with 2 addresses in use (these belong to PC1 and the Hyper-V host).<BR>
|
||||
**ipconfig** displays a primary DNS suffix and suffix search list of contoso.com, IP address of 192.168.0.1, subnet mask of 255.255.255.0, default gateway of 192.168.0.2, and DNS server addresses of 192.168.0.1 and 192.168.0.2.
|
||||
|
||||
2. On SRV1, open an elevated Windows PowerShell prompt and type the following commands:
|
||||
|
||||
```
|
||||
Get-Service DNS,RemoteAccess
|
||||
Get-DnsServerForwarder
|
||||
Resolve-DnsName -Server dc1.contoso.com -Name www.microsoft.com
|
||||
ipconfig /all
|
||||
netsh int ipv4 show address
|
||||
```
|
||||
**Get-Service** displays a status of "Running" for both services.<BR>
|
||||
**Get-DnsServerForwarder** either displays no forwarders, or displays a list of forwarders you are required to use so that SRV1 can resolve Internet names.<BR>
|
||||
**Resolve-DnsName** displays public IP address results for www.microsoft.com.<BR>
|
||||
**ipconfig** displays a primary DNS suffix of contoso.com. The suffix search list contains contoso.com and your corporate domain. Two ethernet adapters are shown: Ethernet adapter "Ethernet" has an IP addresses of 192.168.0.2, subnet mask of 255.255.255.0, no default gateway, and DNS server addresses of 192.168.0.1 and 192.168.0.2. Ethernet adapter "Ethernet 2" has an IP address, subnet mask, and default gateway configured by DHCP on your corporate network.<BR>
|
||||
**netsh** displays three interfaces on the computer: interface "Ethernet 2" with DHCP enabled = Yes and IP address assigned by your corporate network, interface "Ethernet" with DHCP enabled = No and IP address of 192.168.0.2, and interface "Loopback Pseudo-Interface 1" with IP address of 127.0.0.1.
|
||||
|
||||
3. On PC1, open an elevated Windows PowerShell prompt and type the following commands:
|
||||
|
||||
```
|
||||
whoami
|
||||
hostname
|
||||
nslookup www.microsoft.com
|
||||
ping -n 1 dc1.contoso.com
|
||||
tracert www.microsoft.com
|
||||
```
|
||||
**whoami** displays the current user context, for example in an elevated Windows PowerShell prompt, contoso\administrator is displayed.<BR>
|
||||
**hostname** displays the name of the local computer, for example W7PC-001.<BR>
|
||||
**nslookup** displays the DNS server used for the query, and the results of the query. For example, server dc1.contoso.com, address 192.168.0.1, Name e2847.dspb.akamaiedge.net.<BR>
|
||||
**ping** displays if the source can resolve the target name, and whether or not the target responds to ICMP. If it cannot be resolved, "..could not find host" will be diplayed and if the target is found and also responds to ICMP, you will see "Reply from" and the IP address of the target.<BR>
|
||||
**tracert** displays the path to reach the destination, for example srv1.contoso.com [192.168.0.2] followed by a list of hosts and IP addresses corresponding to subsequent routing nodes between the source and the destination.
|
||||
|
||||
## Related Topics
|
||||
|
||||
[Windows 10 deployment scenarios](windows-10-deployment-scenarios.md)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user