-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.rtf
78 lines (72 loc) · 7.34 KB
/
README.rtf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{\rtf1\ansi\ansicpg1252\deff0\nouicompat{\fonttbl{\f0\fnil\fcharset0 Courier New;}{\f1\fnil\fcharset2 Symbol;}}
{\colortbl ;\red0\green0\blue255;}
{\*\generator Riched20 10.0.10240}\viewkind4\uc1
\pard\f0\fs22\lang1033 Windows To Go Creator\par
=====================\par
\par
DESCRIPTION \par
This module, once installed, will allow a user to create Windows To Go drives from PowerShell (PoSh.) It will allow a user to run the \i New-WindowsToGo \i0 command at the PoSh command prompt.\par
\par
The \i New-WindowsToGo \i0 function will create one or more Windows To Go drives. It can create up to 11 drives in parallel. All drives should be Windows To Go certified and attached to the host computer before running this function. You must supply the path to a Windows Image file (.wim) that will be applied to the USB drives during the creation process. If required, you can also supply an unattended installation answer file (.xml) which will be inserted into each drive during creation. A driver, or collection of drivers in a folder, (with the extension .inf) can also be specified and the function will inject them into the USB drive(s) created.\par
\par
When executed, this function will check for the correct PowerShell version, administrator privelages, validity of any file paths supplied, presence of USB drives large enough to fit the supplied image, and prompts the user to select exactly which attached USB drives to use before commiting to the creation process.\par
\par
REQUIREMENTS \par
PowerShell version 5.0 or later (usually included with Windows 10 or later.)\par
\par
INSTALLATION \par
\pard
{\pntext\f0 1.\tab}{\*\pn\pnlvlbody\pnf0\pnindent0\pnstart1\pndec{\pntxta.}}
\fi-360\li720\sb100\sa100 Move the sub-folder "WindowsToGo" into \i %USERPROFILE%\\Documents\\WindowsPowerShell\\Modules\i0 . If this folder does not exist, create it.\line\line NOTE: \i %USERPROFILE% \i0 is your user's folder in Windows. It's usually \i C:\\Users\\[your user name].\i0\par
{\pntext\f0 2.\tab}Open an elevated PoSh command prompt by pressing \b Windows Key + W \b0 and typing "powershell". Right click "Windows PowerShell" in the resultant listing and choose "Run as Administrator".\par
{\pntext\f0 3.\tab}Type \i Set-ExecutionPolicy Unrestricted \i0 at the command prompt and press enter. Choose "Yes" at the confirmation prompt. \line\line WARNING: This will reduce your security level when using PowerShell and will allow non-microsoft certified scripts and functions to run (like this one,) but the risk should be minimal if you're an infrequent PowerShell user. You can reverse this change after you've finished using the function in this module by typing \i Set-ExecutionPolicy Restricted \i0 at the command prompt.\par
{\pntext\f0 4.\tab}Type \i Get-Module -ListAvailable \i0 at the command prompt and confirm that "WindowsToGo" is listed under "Name" in the \i %USERPROFILE%\\Documents\\WindowsPowerShell\\Modules\\\i0 folder (this should be near the top of the output produced, right under the command prompt entry and you'll probably need to scroll up to find it.)\par
{\pntext\f0 5.\tab}Once you've confirmed that the module is available in Step 3, type \i Import-Module WindowsToGo \i0 at the command prompt. This will import the "WindowsToGo" module and make it available as a function you can call anywhere and at any time. \line\line NOTE: If the \i Import-Module \i0 command works correctly, you will not see any output or feedback from running the command. You'll just get another command prompt.\par
\pard\par
DOCUMENTATION \par
Once the module is installed, you can learn how to use the function and the \i New-WindowsToGo \i0 command by typing \i Get-Help New-WindowsToGo\i0 at a PoSh command prompt.\par
\tab\par
USAGE \par
\pard
{\pntext\f0 1.\tab}{\*\pn\pnlvlbody\pnf0\pnindent0\pnstart1\pndec{\pntxta.}}
\fi-360\li720 Open an elevated PoSh command prompt by pressing \b Windows Key + W \b0 and typing "powershell". Right click "Windows PowerShell" in the resultant listing and choose "Run as Administrator".\par
{\pntext\f0 2.\tab}Type \i New-WindowsToGo \i0 and then enter the appropriate parameters and press enter. Use \i Get-Help New-WindowsToGo \i0 at the PoSh command prompt if you need help using the function.\par
\pard\par
EXAMPLES \par
\i PS> New-WindowsToGo D:\\sources\\install.wim\i0 \par
\line Create Windows To Go disk(s) using Windows installation media attached to the computer (usually through DVD or USB.)\par
\par
\par
\i PS> New-WindowsToGo D:\\sources\\install.wim -Drivers ~\\Desktop\\Drivers\\ \i0\par
\par
Create Windows To Go disk(s) using Windows installation media attached to the computer. Inject .inf drivers found in "Drivers" folder on user's desktop.\par
\par
\par
\i PS> New-WindowsToGo ~\\Desktop\\myimage.wim -UnattendPath ~\\Desktop\\unattend.xml -MinimumFreeSpace 8GB \i0\par
Create Windows To Go disk(s) using a custom windows image file called "myimage.wim". Insert a custom unattended installtion file called "unattend.xml" into the Windows To Go drive(s). Ensure that the drive(s) have at least 8GB of free space remaining after creation.\par
\par
\par
\i PS> New-WindowsToGo ~\\Desktop\\myimage.wim -NoPrompts \i0\par
Create Windows To Go disk(s) using a custom windows image file called "myimage.wim". Do not prompt the user for input and image all compatible drives attached to the host computer.\par
\par
NOTES \par
To improve performance while using the \i New-WindowsToGo \i0 function, disable any real-time virus scan or security software. For example, turn off Windows Defender's real-time protection.\par
\par
UPGRADES \par
If you would like to upgrade you're module, delete the contents of \i %USERPROFILE%\\Documents\\WindowsPowerShell\\Modules\\WindowsToGo\i0 and repeate the installation process listed above for the new version. Be sure to restart your PoSh session or run the \i Import-Module \i0 command with the "-Force" switch, like this:\par
\par
\i Import-Module WindowsToGo -Force\i0\par
\par
\par
SUPPORT \par
For support, visit {{\field{\*\fldinst{HYPERLINK https://github.com/FirbyKirby/WindowsToGo }}{\fldrslt{https://github.com/FirbyKirby/WindowsToGo\ul0\cf0}}}}\f0\fs22 and create an issue.\par
\par
SPECIAL THANKS \par
This module was created by generously leveraging the following sample scripts.\par
\pard{\pntext\f1\'B7\tab}{\*\pn\pnlvlblt\pnf1\pnindent0{\pntxtb\'B7}}\fi-360\li720 {{\field{\*\fldinst{HYPERLINK https://technet.microsoft.com/en-us/library/jj721578.aspx }}{\fldrslt{https://technet.microsoft.com/en-us/library/jj721578.aspx\ul0\cf0}}}}\f0\fs22\par
{\pntext\f1\'B7\tab}{{\field{\*\fldinst{HYPERLINK https://blogs.technet.microsoft.com/heyscriptingguy/2015/10/02/use-powershell-to-create-windows-to-go-keyspart-5/ }}{\fldrslt{https://blogs.technet.microsoft.com/heyscriptingguy/2015/10/02/use-powershell-to-create-windows-to-go-keyspart-5/\ul0\cf0}}}}\f0\fs22\par
\pard\par
==============\par
This repository and any materials provided by NI therein are provided AS IS. NI DISCLAIMS ANY AND ALL LIABILITIES FOR AND MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE, OR NON-INFRINGEMENT OF INTELLECTUAL PROPERTY. NI shall have no liability for any direct, indirect, incidental, punitive, special, or consequential damages for your use of the repository or any materials contained therein.\par
\par
}