windows to go - the windows 10 post

I found a great post on setting up Windows To Go with PowerShell. - this information works but assumes that you only have the USB device attached to delete and create attached.  I wanted to take some additional steps to ensure you enumerate everything attached and then pick the appropriate drive:

# this lists the disks attached to the system

$disknumber = Read-Host 'What Disk would you like to COMPLETELY DELETE and REPARTITION for Windows To Go?'

# this assigns the disk as a variable to be used in the script

"you have picked disk $disknumber"

# confirmation


#an opportunity to get out 

$disk = Get-Disk $disknumber

I have also been testing some other changes that I'll post later.