Microsoft has introduced a new feature in Windows 8 called Windows To Go. This feature allows users of the Enterprise version of Windows 8 to install Windows on removable media and start their computers using that media. When the system starts, the entire computing environment is running off of the removable media and presents an entire, fully functional copy of Windows 8.
What are the requirements for Windows To Go?
Microsoft recommends 32GB or larger removable media, using one of the following devices certified for Windows To Go:
- Kingston Data Traveler Ultimate
- Western Digital My Passport Enterprise
- Super Talent Express RC8 for Windows To Go
Note: When I did testing with this feature, I used a Seagate Momentus XT notebook drive and had no problems with the drive or Windows To Go. The feature may work on other hard disks, however certified hard disks are the only ones supported by Microsoft.
What features are available?
Windows To Go is fully functional; however, there are some things to be aware of when configuring the feature. Items to remember include:
- Internal drives in the computer used to run Windows To Go are disabled
- Trusted Platform Module (TPM) is not used
- Hibernation is disabled by default
- Windows Recovery Environment is not available
- Push button reset is not available
- The Store Application is not available
Two of the features listed above can be enabled if needed. Hibernation can be enabled using Group Policy if necessary and the Store Application can be enabled if the Windows To Go instance is not going to be used between multiple computers.
Why use Windows To Go?
The biggest reason I would consider Windows To Go is because the feature allows me to keep a consistent environment available at all times. This allows me to use any compatible hardware as a host PC for my Windows environment. In many cases, hardware that can run Windows 7 will work just fine with Windows To Go. In my testing, I have found the biggest issue in using an external hard drive for the feature is powering the device. When I was able to connect my drive to external power Windows To Go started with no problems. When trying to start it using USB, I had some issues. This may be the age of the hardware I have available for testing, as once I got Windows To Go started there were no problems.
Is my data/environment secure?
Windows To Go supports BitLocker encryption, which can be done during initial configuration or once the application is running. When BitLocker is used, authentication is handled by a startup password since TPM is not available.
How do I create Windows To Go media?
To create a Windows To Go device you will need three things:
- A USB device 32Gb or larger to be the target device
- Windows 8 Enterprise running on a host PC
- Windows 8 installation media
To get started, insert the USB device and the Windows installation media, and then open the control panel and select Windows To Go (or search for Windows To Go on the start screen) on the computer running Windows 8 Enterprise.
The Windows To Go wizard opens and begins searching for the removable media to use as the target.
Tap or Click the removable media found that you wish to be the target device as shown in Figure A. If no media is found, reinsert the target device and select it.
Figure A
Note: Windows To Go will format the target drive during configuration
Tap or click Next.
Windows will attempt to search for Windows 8 installation media as well; tap or click on the found installation media to select it (shown in Figure B). If no media can be located, select the Add Search Location button, then browse to the drive containing the installation media and tap or click OK to continue.
Figure B
Tap or click Next to proceed.
At this point you can configure BitLocker or skip this step to proceed without BitLocker. If you choose to configure BitLocker, enter and confirm the key that should be used for BitLocker, shown in Figure C. Tap or click Next to proceed.
Figure C
To begin the creation process, tap or click Create.
The Windows To Go configuration wizard will prepare the target media and copy Windows files to configure the device. The time needed to create the environment can take up to 30 minutes, but may vary depending on the size of the disk you are working with.
When the creation of the device completes, the wizard will ask you if you would like to restart and use the Windows To Go environment now or wait and configure this at a later time. If you choose to start Windows To Go at a later time, you may need to adjust the boot order within the BIOS on any host systems to start the Windows 8 environment.
Configure Windows To Go from the command line
Like many things in Windows 8, Windows To Go is one of the features that can be configured using command line tools for configuration. PowerShell is the tool of choice for much of the command line configuration in Windows 8, but there are other tools required for getting Windows To Go off the ground. This section configures Windows To Go using command line tools.
Disk preparation steps can be done using PowerShell. The steps include ensuring the disk meets the size requirements and is removable and clearing all the data from the disk. To configure USB target media in PowerShell complete the following steps:
1. Open PowerShell as an administrator by searching for PowerShell and tapping and holding or right-clicking the result and selecting Run As Administrator from the options bar
2. Enter the following PowerShell command to locate all the disks attached to your computer that are USB disks with greater than 30GB of storage, and that are not set to boot. The disks will be returned as an array of objects:
$target = get-disk | where-object {$_.path -match "USBSTOR"} -and $_,size -gt 30gb -and -not $_.isboot
Note: Because the disks are returned as an array into the $target variable, it is best to have only the USB disk that will be used for Windows To Go connected when running these commands. Doing so will make selecting the right disk much easier.
3. Clean the data from the disk you wish to use by entering the following:
Clear-disk -inputobject $target[0] -removedata
Accept the confirmation that data will be deleted from the selected disk. To avoid the prompt, append -confirm:$false to the previous command
4. Execute the following command to initialize the disk with an MBR style partition table.
Intialize-disk -inputobject $target[0] -partitionstyle MBR
5. Create a system partition for the target; the GUI wizard creates a partition 350MB in size:
$syspart = new-partition -inputobject $target[0] -size (350Mb) -isactive
6. Format the new system partition. To skip the confirmation prompt here, append -confirm:$false to the command:
Format-volume -newfilesystemlabel "UFD-sys" -filesystem "fat32" -partition $systpart
7. Create a Windows volume for the operating system using the maximum space remaining and format the volume:
$windows2go = new-partition -inputobject $target[0] -usemaximumsize format-volume -newfilesystemlabel "Windows-2-go" -filesystem NTFS -partition $windows2go
8. Assign drive letters to the new partitions; the letters used must be available. Remove the default drive letter for the Windows partition:
Set-partition -inputobject $syspart -newdriveletter "S"
Set-partition -inputobject $windows2go -newdriveletter "W"
Set-partition -inputobject $windows2go -nodefaultdriveletter $true
The drive should now be prepared for an image to be applied. The next portion of the command line configuration uses the Deployment Image Servicing and Management tool (DISM.exe), which is included with Windows 8. You can execute the dism commands from the PowerShell command line.
9. Apply a good installation media image to the new disk created previously using the following command:
Dism /apply-image /imagefile:x:\<path to image file\w2gimage.wim /index:1 /applydir:W:\
Note: The index number used above must point to the Enterprise image within the WIM file.
Figure D shows the image being applied by the command line utility.
Figure D
Click to enlarge.
10. Next we use another command line tool to move the needed boot components to the 350MB system partition we created:
W:\Windows\system32\bcdboot.exe W:\windows /f All /s S:
Disabling internal disks
Because Windows To Go is meant to be completely contained and portable, disks internal to the computer acting as the host must be disabled, or parked in offline mode while the Windows To Go device is running. To do this, an XML file is needed that holds a SAN Policy, which basically sets the mode for the internal disks. The file should be saved on the Windows To Go partition and the contents look something like the following:
<?xml version='1.0' encoding='utf-8' standalone='yes'?><unattend xmlns-"urn:schemas-microsoft-com:unattend">
<settings pass="offlineservicing">
<component
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
language="neutral"
name="Microsoft-Windows-PartitionManager"
processorArchitecture="x86"
publickeyToken="31bf2856ad364e35"
versionscope="nonSxS"
>
<SanPolicy>4</SanPolicy>
</component>
<component
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
language="neutral"
name="Microsoft-Windows-PartitionManager"
processorArchitecture="amd64"
publickeyToken="31bf2856ad364e35"
versionscope="nonSxS"
>
<SanPolicy>4</SanPolicy>
</component>
</settings>
</unattend>
Note: Depending on the security assigned to the Windows To Go device, you may need to use elevated permissions to copy the file there. If you use the PowerShell session, the following command may be helpful:
Copy-item -path x:\<path to file>\unattend.xml -destination w:\san_pol.xml
Where X:\ is the source disk and W:\ is the Windows To Go volume
Once the answer file (san_pol.xml) has been copied, the SAN Policy needs to be applied. This can be done using Dism.exe and entering the following command:
Dism.exe /image:W:\ /apply-unattend:w:\san_pol.xml
Because the Windows recovery environment is also not used by Windows To Go, an answer file needs to be created to work with sysprep to disable these features as well. The answer file for this portion of the configuration should look like the following:
<?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-WinRE-RecoveryAgent"
processorArchitecture="x86"
publicKeyToken="31bf3856ad364e35" language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UninstallWindowsRE>true</UninstallWindowsRE>
</component>
<component name="Microsoft-Windows-WinRE-RecoveryAgent"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35" language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UninstallWindowsRE>true</UninstallWindowsRE>
</component>
</settings>
</unattend>
Once the answer file (unattend.xml) is created, copy the file to the sysprep folder on the Windows To Go drive, W:\windows\system32\sysprep and boot the Windows To Go environment.
Note: When using the XML files mentioned here, be sure to check the syntax of the file to ensure there are no formatting problems due to styles or other things applied when the syntax was published to the web.
Final thoughts
While the use of the command line can be helpful for some things, using the built in tools in the Windows 8 GUI is much simpler because all of the needed files are created automatically. That being said, once you have used the command line to configure Windows To Go this is something that could be scripted to be run or automated as needed. If I were going to do a few of these configurations as one-offs, I would probably use the GUI, but if there were lots of Windows To Go environments being set up all at once, I would not rule out scripting the configuration.