mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-06-16 02:43:43 +00:00
upd
This commit is contained in:
@ -25,36 +25,35 @@ This guide leverages the Hyper-V server role to perform procedures. If you do no
|
||||
|
||||
## In this guide
|
||||
|
||||
Yadda yadda
|
||||
Description here.
|
||||
|
||||
## Install the Microsoft Deployment Toolkit (MDT)
|
||||
|
||||
1. Temporarily disable IE Enhanced Security Configuration for Administrators by typing the following commands at an elevated Windows PowerShell prompt on SRV1:
|
||||
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.
|
||||
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.
|
||||
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. Re-enable IE Enhanced Security Configuration:
|
||||
3. If desired, re-enable IE Enhanced Security Configuration:
|
||||
```
|
||||
Set-ItemProperty -Path $AdminKey -Name “IsInstalled” -Value 1
|
||||
Stop-Process -Name Explorer
|
||||
```
|
||||
>Alternatively, you can download the MDT and ADK installation files on the Hyper-V host, and then copy or share these files to SRV1.
|
||||
|
||||
## 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. We can use PowerShell on the Hyper-V host to do this. 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:
|
||||
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 the D:\ drive.
|
||||
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.
|
||||
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.
|
||||
|
||||
@ -69,7 +68,7 @@ Yadda yadda
|
||||
|
||||
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**.
|
||||
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**.
|
||||
|
||||
@ -80,9 +79,9 @@ Yadda yadda
|
||||
- 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. If you wish to add applications before proceeding, 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.
|
||||
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:
|
||||
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>
|
||||
@ -98,7 +97,7 @@ Yadda yadda
|
||||
|
||||
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**.
|
||||
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**.
|
||||
|
||||
@ -111,7 +110,7 @@ Yadda yadda
|
||||
|
||||
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.
|
||||
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:
|
||||
|
||||
@ -147,7 +146,7 @@ Yadda yadda
|
||||
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:
|
||||
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
|
||||
@ -168,7 +167,7 @@ Yadda yadda
|
||||
|
||||
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: 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**.
|
||||
>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:
|
||||
|
||||
@ -183,23 +182,23 @@ Yadda yadda
|
||||
|
||||
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. This step requires approximately 15 to 30 minutes, depending on the speed of the Hyper-V host. Setup will complete the following steps:
|
||||
Additional system restarts will occur to complete updating and preparing the operating system. Setup will complete the following procedures:
|
||||
|
||||
- Installs the Windows 10 Enterprise operating system.
|
||||
- Installs added applications, roles, and features.
|
||||
- Updates the operating system using Windows Update (or WSUS if optionally specified).
|
||||
- Stages Windows PE on the local disk.
|
||||
- Runs System Preparation (Sysprep) and reboots into Windows PE.
|
||||
- Captures the installation to a Windows Imaging (WIM) file.
|
||||
- Turns off the virtual machine.
|
||||
- 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.
|
||||
|
||||
The entire process requires one to several hours, depending on the speed of the Hyper-V host and network. After some time, you will have a Windows 10 Enterprise x64 image that is fully patched and has run through Sysprep, located in the C:\MDTBuildLab\Captures folder on your deployment server. The file name is REFW10X64-001.wim.
|
||||
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:
|
||||
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
|
||||
@ -207,7 +206,7 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
|
||||
|
||||
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**.
|
||||
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**.
|
||||
|
||||
@ -225,7 +224,7 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
|
||||
|
||||
### 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.
|
||||
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
|
||||
@ -260,7 +259,7 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
|
||||
OSInstall=YES
|
||||
UserDataLocation=AUTO
|
||||
TimeZoneName=Pacific Standard Time
|
||||
OSDComputerName=%hostname%
|
||||
OSDComputername=#Left("PC_%SerialNumber%",7)#
|
||||
AdminPassword=pass@word1
|
||||
JoinDomain=contoso.com
|
||||
DomainAdmin=administrator
|
||||
@ -307,7 +306,7 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
|
||||
|
||||
### Update the deployment share
|
||||
|
||||
1. Right-click the **MDT Production** deployment share and then click Update 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.
|
||||
|
||||
@ -319,13 +318,13 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
|
||||
|
||||
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 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/).
|
||||
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:
|
||||
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"
|
||||
@ -334,13 +333,13 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
|
||||
|
||||
2. Click **Start**, type **Windows Deployment**, and then click **Windows Deployment Services**.
|
||||
|
||||
3. Expand SRV1.contoso.com, right-click **Boot Images**, and then click **Add Boot Image**.
|
||||
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 might need to temporarily disable the external network adapter on SRV1. This is just an artifact of the lab environment. **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:
|
||||
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
|
||||
@ -362,18 +361,15 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
|
||||
|
||||
5. Choose the **Windows 10 Enterprise x64 Custom Image** and then click **Next**.
|
||||
|
||||
6. When prompted to enter computer details, next to **Computer name** type **PC2** and then click **Next**.
|
||||
|
||||
**Important**: When 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.
|
||||
|
||||
7. To re-enable the external network interface, open an elevated Windows PowerShell prompt on SRV1 and type the following command:
|
||||
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"
|
||||
```
|
||||
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 pc2\administrator.
|
||||
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.
|
||||
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
|
||||
|
||||
@ -388,7 +384,7 @@ This topic will demonstrate how to export user data from an existing client comp
|
||||
|
||||
>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 command:
|
||||
3. Open an elevated command prompt on PC1 and type the following:
|
||||
|
||||
```
|
||||
cscript \\SRV1\MDTProd$\Scripts\Litetouch.vbs
|
||||
@ -397,13 +393,11 @@ This topic will demonstrate how to export user data from an existing client comp
|
||||
|
||||
4. Choose the **Windows 10 Enterprise x64 Custom Image** and then click **Next**.
|
||||
|
||||
5. Click **Next** to accept the default for **Computer name**. <--- delete this step
|
||||
|
||||
6. Choose **Do not back up the existing computer** and click **Next**.
|
||||
5. Choose **Do not back up the existing computer** and click **Next**.
|
||||
|
||||
**Note**: The USMT will still back up the computer.
|
||||
|
||||
7. Lite Touch Installation will perform the following actions:
|
||||
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.
|
||||
@ -411,26 +405,102 @@ This topic will demonstrate how to export user data from an existing client comp
|
||||
|
||||
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.
|
||||
|
||||
8. Sign in with the CONTOSO\Administrator account and verify that user accounts and data have been migrated to the new operating system.
|
||||
7. Sign in with the CONTOSO\Administrator account and verify that user accounts and data have been migrated to the new operating system.
|
||||
|
||||
9. 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:
|
||||
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
|
||||
```
|
||||
10. 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:
|
||||
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 -VM PC1 -Name BeginState
|
||||
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
|
||||
|
||||
1. Type the following commands at an elevated Windows PowerShell prompt on SRV1:
|
||||
At a high level, the computer replace process consists of:<BR>
|
||||
- A special replace task sequence runs the USMT backup and an optional full Window Imaging (WIM) backup.<BR>
|
||||
- On the new machine, a standard bare-metal deployment is performed. At the end of the bare-metal deployment, the USMT backup from the old computer is restored.
|
||||
|
||||
```
|
||||
New-Item -Path C:\MigData -ItemType directory
|
||||
New-SmbShare ?Name MigData$ ?Path C:\MigData
|
||||
```
|
||||
#### Create a backup-only task sequence
|
||||
|
||||
1. On SRV1, 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.
|
||||
2. On PC1, open an elevated command prompt and type the following:
|
||||
```
|
||||
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. Click **Finish** when the capture is complete.
|
||||
5. 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 to press ENTER for network boot, press ENTER.
|
||||
5. On SRV1, re-enable the external network adapter by typing the following command:
|
||||
```
|
||||
Enable-NetAdapter "Ethernet 2"
|
||||
```
|
||||
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\USMT
|
||||
7. Setup will install the Windows 10 Enterprise operating system, update via Windows Update, and restore the user settings and data from PC1.
|
||||
|
||||
Note: If there are problems with deployment, you can review logs in the following locations on the client computer:
|
||||
- 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
|
||||
|
||||
## Related Topics
|
||||
|
||||
|
@ -201,10 +201,10 @@ The lab architecture is summarized in the following diagram:
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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. 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:
|
||||
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
|
||||
@ -252,19 +252,26 @@ The lab architecture is summarized in the following diagram:
|
||||
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).
|
||||
|
||||
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 to 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"
|
||||
```
|
||||
>Since an external virtual switch is associated to a physical NIC on the Hyper-V host, this NIC must be specified when adding the virtual switch. In the previous step, we attempt to automate this by filtering for active ethernet adapters. If your Hyper-V host is has multiple active ethernet adapters, this automation will not work and the second command above will fail. In this case, you will need to edit the command used to add the "poc-external" VM switch by inserting the specific value needed for the -NetAdapterName option (the name of the network interface you wish to use).
|
||||
>Additionally, since an external virtual switch is associated to a physical NIC on the Hyper-V host, this NIC must be specified when adding the virtual switch. This step 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
|
||||
```
|
||||
>On a Hyper-V host computer with 16 GB of 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.
|
||||
>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:
|
||||
|
||||
@ -281,15 +288,18 @@ Note: The Hyper-V Windows PowerShell module is not available on Windows Server 2
|
||||
$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 Windows Server 2012 R2 VHDs
|
||||
|
||||
1. Open an elevated Windows PowerShell window on the Hyper-V host and start the first VM by typing the following command:
|
||||
1. At an elevated Windows PowerShell prompt on the Hyper-V host, start the first VM by typing the following command:
|
||||
|
||||
```
|
||||
Start-VM DC1
|
||||
@ -298,35 +308,36 @@ Note: The Hyper-V Windows PowerShell module is not available on Windows Server 2
|
||||
```
|
||||
vmconnect localhost DC1
|
||||
```
|
||||
3. Accept the default settings, read license terms and accept them, provide an administrator password of **pass@word1**, and click **Finish**.
|
||||
4. 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." At an elevated Windows PowerShell prompt on DC1, type the following commands to provide a new hostname and configure a static IP address and gateway:
|
||||
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.
|
||||
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 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 will be added to a member server at 192.168.0.2 later in this guide.
|
||||
5. Install the Active Directory Domain Services role by typing the following command at an elevated Windows PowerShell prompt:
|
||||
>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
|
||||
```
|
||||
|
||||
6. Before promoting DC1 to a Domain Controller, you must reboot so that the name change in step 3 above takes effect:
|
||||
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
|
||||
```
|
||||
|
||||
7. 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:
|
||||
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.
|
||||
8. When the reboot has completed, 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:
|
||||
9. When the reboot has completed, 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
|
||||
@ -336,35 +347,36 @@ Note: The Hyper-V Windows PowerShell module is not available on Windows Server 2
|
||||
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
|
||||
```
|
||||
9. Next, add a DHCP scope and set option values:
|
||||
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.
|
||||
10. Lastly, add a user account to the contoso.com domain that can be used with client computers:
|
||||
11. Lastly, 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
|
||||
```
|
||||
11. Minimize the DC1 VM window but **do not stop** the VM.
|
||||
12. 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.
|
||||
|
||||
12. Using an elevated Windows PowerShell prompt on the Hyper-V host, start the client VM (PC1), and connect to it:
|
||||
13. 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
|
||||
```
|
||||
13. Sign on to PC1 using an account that has local administrator rights.<BR>
|
||||
14. Sign on to PC1 using an account that has local administrator rights.<BR>
|
||||
>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.
|
||||
14. 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.
|
||||
15. 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.
|
||||
|
||||
15. 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**.
|
||||
16. 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.
|
||||
16. 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**.
|
||||
17. 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
|
||||
@ -380,7 +392,7 @@ Note: The Hyper-V Windows PowerShell module is not available on Windows Server 2
|
||||
|
||||
ping dc1.contoso.com
|
||||
|
||||
Pingng dc1.contoso.com [192.168.0.1] with 32 bytes of data:
|
||||
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
|
||||
@ -396,7 +408,9 @@ Note: The Hyper-V Windows PowerShell module is not available on Windows Server 2
|
||||
Our Site Name: Default-First-Site-Name
|
||||
Flags: PDC GC DS LDAP KDC TIMESERV WRITABLE DNS_FOREST CLOSE_SITE FULL_SECRET WS 0xC000
|
||||
```
|
||||
17. From an elevated Windows PowerShell prompt, type the following commands to forcibly remove the computer from its previous domain, join the contoso.com domain, and then restart the computer:
|
||||
>**Note**: 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.
|
||||
|
||||
18. 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
|
||||
@ -405,41 +419,52 @@ Note: The Hyper-V Windows PowerShell module is not available on Windows Server 2
|
||||
Add-Computer -DomainName contoso -Credential $cred
|
||||
Restart-Computer
|
||||
```
|
||||
19. Click **File**, click **Save As**, and save the commands as **c:\VHD\ps1.ps1** on the Hyper-V host.
|
||||
20. 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
|
||||
```
|
||||
|
||||
21. 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.
|
||||
|
||||
18. After PC1 restarts, sign in to the contoso.com domain with the (user1) account you created in step 8.
|
||||
19. 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.
|
||||
20. On the Hyper-V host computer at an elevated Windows PowerShell prompt, type the following commands:
|
||||
22. After PC1 restarts, sign in to the contoso.com domain with the (user1) account you created in step 11 of this section.
|
||||
23. 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.
|
||||
24. On the Hyper-V host computer, at an elevated Windows PowerShell prompt, type the following commands:
|
||||
```
|
||||
Start-VM SRV1
|
||||
vmconnect localhost SRV1
|
||||
```
|
||||
21. 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**.
|
||||
22. Sign in to the member server VM using the administrator account, open an elevated Windows PowerShell prompt, and type the following commands:
|
||||
25. 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**.
|
||||
26. 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.
|
||||
27. Open an elevated Windows PowerShell prompt on SRV1, and type or paste 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
|
||||
```
|
||||
28. 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 -Credential $cred
|
||||
Restart-Computer
|
||||
```
|
||||
23. Sign in to the contoso.com domain on SRV1 using the domain administrator account, open an elevated Windows PowerShell prompt, and type the following commands:
|
||||
29. 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
|
||||
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
|
||||
```
|
||||
>The previous commands assume that network interfaces were added to the SRV1 VM in the order specified by this guide, resulting in an interface alias of "Ethernet" for the private interface and an interface alias of "Ethernet 2" for the public interface. If the interfaces on SRV1 are not named the same, you must adjust these commands appropriately.
|
||||
30. Before configuring routing services, 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.
|
||||
|
||||
To view a list of interfaces and their associated interface aliases on the VM, use the following Windows PowerShell command:
|
||||
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
|
||||
@ -449,20 +474,35 @@ Note: The Hyper-V Windows PowerShell module is not available on Windows Server 2
|
||||
10.137.130.118 Ethernet 2
|
||||
192.168.0.2 Ethernet
|
||||
```
|
||||
24. The DNS server role was installed on SRV1 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. To add this server-level DNS forwarder on DC1, type the following command at an elevated Windows PowerShell prompt on DC1:
|
||||
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 following commands to configure routing services.
|
||||
31. 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
|
||||
```
|
||||
32. Verify that routing is working as expected by
|
||||
|
||||
33. The DNS server role was installed on SRV1 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
|
||||
```
|
||||
If 192.168.0.2 is not already configured as a forwarder, you can use the following command to add it:
|
||||
```
|
||||
Add-DnsServerForwarder -IPAddress 192.168.0.2
|
||||
```
|
||||
25. The DNS service on SRV1 also needs to resolve hosts in the contoso.com domain. This can be accomplished with a conditional forwarder. To add a conditional forwarder, open an elevated Windows PowerShell prompt on SRV1 and type the following command:
|
||||
34. The DNS service on SRV1 also needs to resolve hosts in the contoso.com domain. This can be accomplished with a conditional forwarder. To add 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
|
||||
```
|
||||
26. If your corporate network has a firewall that filters queries from local DNS servers, you might be forced to configure a server-level DNS forwarder to resolve Internet names. To do this, open an elevated Windows PowerShell prompt on SRV1 and type the following commands:
|
||||
35. If your corporate network has a firewall that filters queries from local DNS servers, you might be forced to configure a server-level DNS forwarder to resolve Internet names. To do this, open an elevated Windows PowerShell prompt on SRV1 and type the following commands:
|
||||
```
|
||||
Add-DnsServerForwarder -IPAddress (Get-DnsClientServerAddress -InterfaceAlias "Ethernet 2").ServerAddresses
|
||||
```
|
||||
27. Verify that all three VMs on the PoC network can reach the Internet, and each other.
|
||||
28. 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:
|
||||
36. Verify that all three VMs on the PoC network can reach the Internet, and each other.
|
||||
37. 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
|
||||
@ -474,7 +514,7 @@ If your Hyper-V host is running Windows Server 2008 R2, several of the steps in
|
||||
|
||||
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 also be accomplished by using 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"
|
||||
@ -552,8 +592,13 @@ Use the following procedures to verify that the PoC environment is configured pr
|
||||
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.
|
||||
**hostname** displays the name of the local computer, for example W7PC-001.
|
||||
**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.
|
||||
**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)
|
||||
|
Reference in New Issue
Block a user