So I was playing a few weeks back and thought I’d share on some of my fun.   Like many IT Pros I downloaded the Windows 10 CTP media to test out and try Windows 10.   In my case I spun it up inside a Virtual machine to see a side by side comparison on my production Windows 8.1 laptop.

During this process my boss’ hard drive went caput on his laptop.   Fortunately for him he was recently migrated to a honking cool Surface Pro 3 laptop.

Fortunately for ME there was minimal data loss and this gave me a chance to play with something else.   Windows To Go.

You see, apparently if you want to run an operating system you need SOME kind of data storage.   Since we didn’t have a spare drive for his particular model of laptop (or in my case all of the “spares” were holding backup copies of his data) I wanted to fire up Windows 10 to see what it looked like on his laptop.

So the answer was easy.  “I’ll just pop in my Kingston USB and make a Windows To Go version of Windows 10.”

The important rules have not changed.   Windows to Go still requires Windows Enterprise media, of which my CTP media is !

Ah but a small problem.   Although I can access the file structure on the key I am unable to create partitions.   Or for that matter running the built in Windows to Go Wizard.

Looking about online there are options however to bypass this issue.   It involves a Direct Passthru to the physical disk in Hyper-V and a little coolness in Windows PowerShell to generate the content on the key.   Now in TRUTH I COULD bypass the VM and just run the script and build it directly on the PC but Where’s the FUN in THAT?! Smile

So challenge one.  Connect the USB to the Host environment.  

In this scenario I have a Kingston DT Ultimate attached to my PC.   You’ll need to bring it offline in Disk Management First

image

Now that the disk is offline, I can enter my Virtual Machine Configuration and attach the disk in “Pass Thru” Mode.

image

image

With the USB Disk in Pass thru mode I can now access it directly within the Virtual Machine. 

Now of course we could have just done all this with PowerShell with the following Cmdlets.

# Identify the USB key which is Greater than 20GB in size

$disk=(GET-DISk) | where { $_.Bustype -eq 'USB' -and $_.Size -ge 20GB -and -not $_.isboot }

# Bring the key offline on the Hyper-V Host (Windows 8.1 laptop)

$disk | Set-Disk –isoffline:$True

# Attach said disk to the Virtual machine named “EOT-WIN10-CTP”

$disk | Add-VmHardDiskDrive –vmname EOT-WIN10-CTP

For this next amazing magic trick we’re going to be running a Windows PowerShell script to partition the key.    This comes courtesy of a Step by Step  article on Technet for creating the Windows To Go key directly without using the Wizard.   The script however is based upon the presumption that the attached disk in question in USB.  But Within the Virtual Machine it will appear as an ordinary disk.

To adapt to this scenario take the Microsoft script and edit the line reading

$Disk = Get-Disk | Where-Object {$_.Path -match "USBSTOR" -and $_.Size -gt 20Gb -and -not $_.IsBoot }

and replace it as

$Disk = Get-Disk | Where-Object {$_.Size -gt 20Gb –and $_.Size –le 64GB –and -not $_.IsBoot }

From this point forward the script will work as designed WITHIN the Virtual machine and partition the key ready for the Windows To Go structure.

Be FULLY FOREWARNED! If you are running this in a Virtual Machine which has disks OTHER than the Bootable C: drive and your Windows To Go key which are bigger than 20gb and smaller than 64gb you WILL ABSOLUTELY LOSE THEM.   So PLEASE just run this inside a virtual machine you could consider a “throwaway” and not something critical to production like the Exchange or the BES server. 

For the purposes of fun and truly “throw away” I am running all of this inside a Virtualized Windows 10 CTP.   So if I goof up, it’s just a test machine.  You should do the same Smile

Going forward as per the instructions from Technet we can run DISM to apply the image.   In the case of this Virtual machine, I have the Windows 10 CTP mounted in the DVD drive and will be leveraging it’s WIM file to image this key.   The original document called for leveraging DISM.EXE

dism /apply-image /imagefile:D:\Sources\Install.wim /index:1 /applydir

But instead I’m going to use the PowerShell which does EXACTLY the same thing

Expand-WindowsImage –imagepath D:\Sources\Install.wim –index 1 –ApplyPath W:\

From this point (After some waiting time of the image dropping onto the key of course) we can run this command to make the key bootable

W:\Windows\System32\bcdboot W:\Windows /f ALL /s S:

Normally at this point you would apply the san_policy.xml file using this command in DISM. 

Dism.exe /Image:W:\ /Apply-Unattend:W:\san_policy.xml

Instead we’re going to jump ahead and just use the PowerShell Cmdlet instead (Does somebody out there smell a SINGLE PowerShell script we could use to do all of this now?)

Use-WindowsUnattend –unattendpath .\san_policy.xml –path W:\

Then of course the most critical piece, dropping in an Unattend.xml file to automate the startup of the WTG environment

Copy-item .\Unattend.xml –destination W:\Windows\System32\Sysprep

Then let’s disconnect that Disk from the virtual Machine

Get-VM EOT-WIN10-CTP | Get-VmHarddiskDrive | Where { $_.DiskNumber } | Remove-VMHarddiskDrive

Now just RIP that USB key off the side of your machine and enjoy your new Windows to Go!

It’s time for Trick or Treat this month and this month we give You a treat!

Some of the options for accessing and sharing media such as video and audio have truly opened up to the masses.

Pop in for a bit as we open up our basement doors to introduce you to the Xbox One and even a $35 computer!

Sean Kearney (Honorary Scripting Guy)'s avatarimage

Bio – Sean Kearney, Cistel Technology Inc.

Sean Kearney is a Senior Solutions Architect at the Advanced Microsoft Solutions team at Cistel Technology Inc. He lives in the world of Automation leveraging technologies such as System Center 2012 Orchestrator and will break out into song when the word “PowerShell” is even mumbled in the area.   He has recently presented at both TechEd in North America and Europe.

Also he has contributed three Unique Holiday Specials about PowerShell to Microsoft, is an Honorary Scripting Guy who regularly contributes to www.scriptingguys.com on Technet and is also a Charter Member of the Springboard Technical Experts Program. 

Rumor has it he is trying build a T.A.R.D.I.S. Out of dishwasher parts and old Commodore Vic 20 Datasettes.

clip_image001image

Bio – Garth Gorling, Cistel Technology Inc.

Garth has been in the IT field for over 10 years now.  He has been awarded his MCITP in Windows 7: Enterprise Desktop Administration and many other certificates.  Recently he has been to the Microsoft Redmond campus to receive beta training for Operating System and Application deployment as well as participate in Windows 8 IS-SS sessions.

At Cistel, his main role is to act as the technical prime for a number of small to medium sized businesses in the Ottawa area.  He is also responsible for coordinating in-company training on a range of topics but takes special pleasure in Window 8.

Event location

Microsoft Office
100 Queen St
Suite 500
Ottawa, ON K1P 5T8
Canada
Thursday, 23 October 2014 from 6:00 PM to 8:00 PM (EST)

We had some fun today at work.   Somebody tried to help somebody else out, then somebody asked somebody ELSE to try and undo to help out… then it all went wrong.

*I* was the somebody else and the problem (Pretty simple NOW that I’ve got it figured out) was they needed to have the Audio for their headset temporarily disabled to allow a different device to default for output (long story, different blog post)

So my friend who tried to help out (NAMES BLOCKED OUT TO PROTECT MY EMPLOYEE REVIEW) went down to the PC in question, and entered the Sound Control panel in Windows 8.1 and marked the device as Disabled.

image

image

So a few weeks later, poor hapless little Sean walks over to enable the Device only to see this.

image

…it’s not there to disable.   So in the meantime I have gone to Device Manager (Yes, yes… you in the back.  I COMPLETELY overlooked the option in the picture above that said “Show Disabled Devices”, but if I HAD you wouldn’t get to read this nifty Blog post would you?

Now where was I… OH YES! The Device Manager.   I gone it and “Found” the trouble making device by clicking on “View, Show Hidden Devices” under Device Manager.  

image

“Why I know what I’ll do!  I’ll just UNINSTALL the suspect device, unplug the USB cable, plug it back in and BOB’S YOUR UNCLE, DONE!”

image

But guess what (the reason you’re reading this) it wouldn’t redetect.    This of course released a torrent of magic words.

Turns out if I dug a little further there was a Parent entry under the “Sound, video and game controllers” entry marked as “Jabra Pro 9470”.  I uninstalled THAT, unplugged and replugged in the USB cable (and somehow maybe sacrificed a few helpless CD’s to the Demo gods) and then suddenly.

*DING*

…all fixed!

Of course this was to fix what *I* broke.   The actual answer would have been to “Show Disabled Devices” under the Sound Control panel and simply click on “Enable”.

image

I have only word thing to say about THAT.

*DOH!*