- Windows commands
- Prerequisites
- Command shell overview
- Command-line reference A-Z
- Command-Line Reference
- Prerequisites
- Feature description
- New and deprecated functionality
- Command shell overview
- Customize the Command Prompt window
- To configure the Command Prompt window
- Command-line reference A-Z
- Command-Line Reference
- Prerequisites
- Feature description
- New and deprecated functionality
- Command shell overview
- Customize the Command Prompt window
- To configure the Command Prompt window
- Command-line reference A-Z
- Windows Setup Command-Line Options
- /1394Debug
- /AddBootMgrLast
- /BitLocker
- /BusParams
- /ConfigFile
- /CompactOS
- /Compat
- /CopyLogs
- /Debug
- /DiagnosticPrompt
- /DynamicUpdate
- /EMSPort
- /Finalize
- /ImageIndex
- /InstallDrivers
- /InstallFrom
- /InstallLangPacks
- /MigNEO
- /MigrateDrivers
- /NetDebug
- /NoReboot
- /Priority
- /PostOOBE
- /PostRollback
- /Quiet
- /ReflectDrivers
- /ResizeRecoveryPartition
- /ShowOOBE
- /SkipFinalize
- /Telemetry
- /TempDrive
- /Unattend
- /Uninstall
- /USBDebug
- /WDSDiscover
- /WDSServer
Windows commands
All supported versions of Windows (server and client) have a set of Win32 console commands built in.
This set of documentation describes the Windows Commands you can use to automate tasks by using scripts or scripting tools.
Prerequisites
The information that is contained in this topic applies to:
- Windows Server 2019
- Windows Server (Semi-Annual Channel)
- Windows Server 2016
- Windows Server 2012 R2
- Windows Server 2012
- Windows Server 2008 R2
- Windows Server 2008
- Windows 10
- Windows 8.1
Command shell overview
The Command shell was the first shell built into Windows to automate routine tasks, like user account management or nightly backups, with batch (.bat) files. With Windows Script Host you could run more sophisticated scripts in the Command shell. For more information, see cscript or wscript. You can perform operations more efficiently by using scripts than you can by using the user interface. Scripts accept all Commands that are available at the command line.
Windows has two command shells: The Command shell and PowerShell. Each shell is a software program that provides direct communication between you and the operating system or application, providing an environment to automate IT operations.
PowerShell was designed to extend the capabilities of the Command shell to run PowerShell commands called cmdlets. Cmdlets are similar to Windows Commands but provide a more extensible scripting language. You can run Windows Commands and PowerShell cmdlets in Powershell, but the Command shell can only run Windows Commands and not PowerShell cmdlets.
For the most robust, up-to-date Windows automation, we recommend using PowerShell instead of Windows Commands or Windows Script Host for Windows automation.
You can also download and install PowerShell Core, the open source version of PowerShell.
Incorrectly editing the registry may severely damage your system. Before making the following changes to the registry, you should back up any valued data on the computer.
To enable or disable file and directory name completion in the Command shell on a computer or user logon session, run regedit.exe and set the following reg_DWOrd value:
To set the reg_DWOrd value, use the hexadecimal value of a control character for a particular function (for example, 0 9 is Tab and 0 08 is Backspace). User-specified settings take precedence over computer settings, and command-line options take precedence over registry settings.
Command-line reference A-Z
To find information about a specific command, in the following A-Z menu, click the letter that the command starts with, and then click the command name.
Command-Line Reference
Applies To: Windows Server 2003, Windows Vista, Windows XP, Windows Server 2008, Windows 7, Windows Server 2003 R2, Windows Server 2008 R2, Windows Server 2000, Windows Server 2012, Windows 8
Use this topic to find the documentation resources and other technical information that you need to learn about the command shell, and to automate command-line tasks by using scripts or scripting tools.
To read introductory information about the command shell and command-line tools, see Feature description. To see a listing of new and deprecated command-line tools see New and deprecated functionality.
To find information about a specific command, in the following A-Z menu, click the letter that the command starts with, and then click the command name.
Prerequisites
The information that is contained in this overview applies to:
Windows Server 2012
WindowsВ ServerВ 2008В R2
WindowsВ ServerВ 2008
WindowsВ ServerВ 2003В R2
WindowsВ ServerВ 2003
Feature description
New and deprecated functionality
New or Deprecated?
Create a new cluster or configure an existing cluster.
Configure DFS folders and folder targets in a DFS namespace.
Creates and manages File Server Resource Manager quotas.
Create and manage file groups, file screens, file screen exceptions, and file screen templates that are used to configure general administrative options for screening files.
Enable optional features in Windows by downloading required files from WindowsВ Update or a source that Group Policy specifies.
Read, write, run, debug, and test Windows PowerShell scripts and modules in a friendly, graphic-assisted environment.
Install or remove roles, role services, and features.
Monitor an RD Session Host session.
Create and manage storage reports and storage report tasks, and configure general administrative options for File Server Resource Manager.
Command shell overview
The command shell is a software program that provides direct communication between the user and the operating system. The non-graphical, command shell user interface provides the environment in which you run character-based applications and utilities. The command shell executes programs and displays their output on the screen by using individual characters similar to the MS-DOS command interpreter, Command.com. The command shell in the Windows Server operating system uses the command interpreter, Cmd.exe. Cmd.exe loads applications, directs the flow of information between applications, and translates user input into a form that the operating system understands.
You can use the command shell to create and edit scripts to automate routine tasks. For example, you can create simple scripts in batch (.bat) files to automate the management of user accounts or nightly backups. You can also use the command-line version of Windows Script Host to run more sophisticated scripts in the command shell. For more information, see Cscript or Wscript. You can perform operations more efficiently by using scripts than you can by using the user interface. Scripts accept all commands that are available at the command line.
Customize the Command Prompt window
You can change the properties for the Command Prompt window.
To configure the Command Prompt window
Open a Command Prompt window, click the upper-left corner of the Command Prompt window, and then click Properties. (Or to open Command Prompt Properties from the keyboard, press ALT+SPACEBAR+P.)
Click the Options tab.
In Command History, type or select 999 in Buffer Size, and then type or select 5 in Number of Buffers. By increasing the screen buffer size to 999, you enable scrolling through the Command Prompt window. By increasing the number of buffers to five, you increase the number of lines in the Command Prompt window to 5000.
In Edit Options, select the Quick Edit Mode and Insert Mode check boxes.
Click the Layout tab.
In Screen Buffer Size, type or select 2500 in Height.
To further customize your Command Prompt window settings, perform any of the following optional tasks:
In Screen Buffer Size, increase Width.
In Window Size, increase Height.
In Window Size, increase Width.
Clear the Let system position window check box, and then, in Window Position, change the values in Left and Top.
In the Apply Properties dialog box, click Save properties for future windows with same title.
To enable or disable file and directory name completion on a computer or user logon session, run Regedit.exe and set the following REG_DWORD value : HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar\REG_DWORD To set the REG_DWORD value, use the hexadecimal value of a control character for a particular function (for example, 0Г—9 is Tab and 0Г—08 is Backspace). User-specified settings take precedence over computer settings, and command-line options take precedence over registry settings.
Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on the computer.
Command-line reference A-Z
To find information about a specific command, in the following A-Z menu, click the letter that the command starts with, and then click the command name.
Each command-line tool topic displays the version of Windows that is supported by the command-line tool.
Command-Line Reference
Applies To: Windows Server 2003, Windows Vista, Windows XP, Windows Server 2008, Windows 7, Windows Server 2003 R2, Windows Server 2008 R2, Windows Server 2000, Windows Server 2012, Windows 8
Use this topic to find the documentation resources and other technical information that you need to learn about the command shell, and to automate command-line tasks by using scripts or scripting tools.
To read introductory information about the command shell and command-line tools, see Feature description. To see a listing of new and deprecated command-line tools see New and deprecated functionality.
To find information about a specific command, in the following A-Z menu, click the letter that the command starts with, and then click the command name.
Prerequisites
The information that is contained in this overview applies to:
Windows Server 2012
WindowsВ ServerВ 2008В R2
WindowsВ ServerВ 2008
WindowsВ ServerВ 2003В R2
WindowsВ ServerВ 2003
Feature description
New and deprecated functionality
New or Deprecated?
Create a new cluster or configure an existing cluster.
Configure DFS folders and folder targets in a DFS namespace.
Creates and manages File Server Resource Manager quotas.
Create and manage file groups, file screens, file screen exceptions, and file screen templates that are used to configure general administrative options for screening files.
Enable optional features in Windows by downloading required files from WindowsВ Update or a source that Group Policy specifies.
Read, write, run, debug, and test Windows PowerShell scripts and modules in a friendly, graphic-assisted environment.
Install or remove roles, role services, and features.
Monitor an RD Session Host session.
Create and manage storage reports and storage report tasks, and configure general administrative options for File Server Resource Manager.
Command shell overview
The command shell is a software program that provides direct communication between the user and the operating system. The non-graphical, command shell user interface provides the environment in which you run character-based applications and utilities. The command shell executes programs and displays their output on the screen by using individual characters similar to the MS-DOS command interpreter, Command.com. The command shell in the Windows Server operating system uses the command interpreter, Cmd.exe. Cmd.exe loads applications, directs the flow of information between applications, and translates user input into a form that the operating system understands.
You can use the command shell to create and edit scripts to automate routine tasks. For example, you can create simple scripts in batch (.bat) files to automate the management of user accounts or nightly backups. You can also use the command-line version of Windows Script Host to run more sophisticated scripts in the command shell. For more information, see Cscript or Wscript. You can perform operations more efficiently by using scripts than you can by using the user interface. Scripts accept all commands that are available at the command line.
Customize the Command Prompt window
You can change the properties for the Command Prompt window.
To configure the Command Prompt window
Open a Command Prompt window, click the upper-left corner of the Command Prompt window, and then click Properties. (Or to open Command Prompt Properties from the keyboard, press ALT+SPACEBAR+P.)
Click the Options tab.
In Command History, type or select 999 in Buffer Size, and then type or select 5 in Number of Buffers. By increasing the screen buffer size to 999, you enable scrolling through the Command Prompt window. By increasing the number of buffers to five, you increase the number of lines in the Command Prompt window to 5000.
In Edit Options, select the Quick Edit Mode and Insert Mode check boxes.
Click the Layout tab.
In Screen Buffer Size, type or select 2500 in Height.
To further customize your Command Prompt window settings, perform any of the following optional tasks:
In Screen Buffer Size, increase Width.
In Window Size, increase Height.
In Window Size, increase Width.
Clear the Let system position window check box, and then, in Window Position, change the values in Left and Top.
In the Apply Properties dialog box, click Save properties for future windows with same title.
To enable or disable file and directory name completion on a computer or user logon session, run Regedit.exe and set the following REG_DWORD value : HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar\REG_DWORD To set the REG_DWORD value, use the hexadecimal value of a control character for a particular function (for example, 0Г—9 is Tab and 0Г—08 is Backspace). User-specified settings take precedence over computer settings, and command-line options take precedence over registry settings.
Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on the computer.
Command-line reference A-Z
To find information about a specific command, in the following A-Z menu, click the letter that the command starts with, and then click the command name.
Each command-line tool topic displays the version of Windows that is supported by the command-line tool.
Windows Setup Command-Line Options
The following command-line options are available for WindowsВ Setup (setup.exe). Beginning with Windows 10, version 1607, you can use a setupconfig file as an alternative to passing parameters to Windows Setup on a command line. For more information, see Windows Setup Automation Overview.
/1394Debug
Enables kernel debugging over an IEEE 1394 (FireWire) port while Windows is running and during the WindowsPE configuration pass of Windows Setup.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | No |
setupconfig.ini files used for feature updates | No |
Remarks
The default value for is 1. specifies the baud to use when Windows transfers data during debugging. The default value is 19200, but can also be set to 57600 or 115200.
/AddBootMgrLast
Instructs Windows Setup to add the Windows Boot Manager as the last entry in the UEFI firmware boot order.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | No |
setupconfig.ini files used for feature updates | No |
Remarks
This option is only supported on UEFI PCs running Windows PE 4.0 or later.
Performs an automated upgrade to Windows 10 or Windows 8.1 volume license editions only.
Parameter | Description |
---|---|
Clean | Performs a clean install of Windows |
DataOnly | Performs an upgrade of Windows, saving only data (and not apps.) If the data-only installation option is not available due to compatibility checks, Windows Setup will exit silently and log an exit code. |
Upgrade | Performs an upgrade of Windows saving apps and data. If the upgrade installation option is not available, or the user needs to resolve an app compatibility issue, Windows Setup will exit silently and log an exit code. |
NoAutoEit | Not used in Windows 10. In Windows 8.1, if an error is found, Windows Setup does not exit, but instead stops and stays on the Windows Setup screen until the user addresses the issue. The installation from that point on is attended. |
PerformDU | Not used in Windows 10. In Windows 8.1, Windows Setup checks for Dynamic Updates for Windows Setup |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | No |
Remarks
When /Auto is used, an unattend file cannot be used. When /Auto is used, Windows Setup consumes ei.cfg, and checks compatibility issues before starting the installation. If ei.cfg is malformed, Windows Setup exits silently and logs an exit code. See Windows Setup Exit Codes below. When /Auto is used, only the following customizations of the Windows image are supported. This is not a change in Windows Setup support policy but instead a clarification:
- Applying a cumulative (quality) update
- Applying updates to the servicing stack necessary to complete the feature update (see Servicing stack updates for more information)
- Applying updates to Setup.exe binaries or other files that Setup uses for feature updates
- Appling updates for the «safe operating system» (SafeOS) that is used for the Windows recovery environment
- Adding or removing languages
- Adding or removing Features on Demand
For clarity, when /Auto is used, Windows Setup does not support upgrades nor clean installs to a Windows image that has been customized by adding / removing / changing applications, settings nor drivers.
When /Auto is used, Windows Setup will upgrade using the \sources\install.wim Windows image. Using Dism /Export-Image, this image can be used as a source image for exporting a new image using the /Compress:recovery option. This exported image must be named install.esd for Windows Setup to use it instead of install.wim. You must also remove install.wim from \sources. You should only export to install.esd if you want to reduce the Windows image size. The exported image will be smaller, but will not be mountable.
/BitLocker
Specifies the BitLocker status during upgrades.
Parameter | Description |
---|---|
AlwaysSuspend | BitLocker is always suspended during an upgrade. |
TryKeepActive | Attempts an upgrade without suspending BitLocker. If the upgrade fails, Windows Setup will suspend BitLocker and complete the upgrade. This is the default behavior if the /BitLocker option is not specified. |
ForceKeepActive | Enables upgrading without suspending BitLocker. If the upgrade can’t be completed because BitLocker is active, the upgrade will fail. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
/BusParams
Specifies the PCI address of a 1394, USB, or NET debug port.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | No |
setupconfig.ini files used for feature updates | No |
Remarks
The bus, device, and function numbers must be in decimal format. For more info, see Setting Up Kernel Debugging with USB 2.0.
/ConfigFile
Specifies the location to the setupconfig file.
Parameter | Description |
---|---|
Local file path or UNC network path to a folder that contains the Windows Setup configuration file. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | No |
Remarks
If you include an option on the command line and the same option in the setupconfig file, the setupconfig file option and value has precedence.
/CompactOS
Specifies whether to use the Compact OS feature to save hard drive space.
Parameter | Description |
---|---|
Enable | Windows Setup installs Windows using compressed system files. |
Disable | Windows Setup installs Windows using uncompressed system files. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
By default, Windows Setup determines whether to use this feature automatically. To learn more about Compact OS, see Compact OS, single-instancing, and image optimization.
/Compat
Instructs Windows Setup how to handle compatibility scans and messages.
Parameter | Description |
---|---|
IgnoreWarning | Windows Setup completes installation, ignoring any dismissible compatibility messages. |
ScanOnly | Windows Setup runs through compatibility scans, and then exits (without completing the installation) with an exit code to indicate if any compatibility concerns are present. Windows Setup will return 0xC1900210 if no concerns are found. Windows Setup will return 0xC1900208 if compatibility concerns are found. |
This command works with other switches. To run Windows Setup in the background without any UI:
To ignore common disclaimers in the UI, for example, language changes:
Often an IT Pro will look at the compat XML if Windows Setup finds compatibility issues. Use /CopyLogs to collect Windows Setup logs:
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes only with /Compat IgnoreWarning |
Remarks
This option is available in Windows 10.
If you launch Windows Setup with /Compat ScanOnly:
- If it does not find any compatibility issue, it will return MOSETUP_E_COMPAT_SCANONLY (0xC1900210)
- If it finds actionable compatibility issues, like Apps, it will return MOSETUP_E_COMPAT_INSTALLREQ_BLOCK (0xC1900208)
- If it finds that the Mig-Choice selected is not available, it will return MOSETUP_E_COMPAT_MIGCHOICE_BLOCK (0xC1900204)
- If it finds that machine is not eligible for Windows 10, it will return MOSETUP_E_COMPAT_SYSREQ_BLOCK (0xC1900200)
- If it finds that machine does not have enough free space to install, it will return MOSETUP_E_INSTALLDISKSPACE_BLOCK (0xC190020E)
/CopyLogs
Windows Setup will copy or upload compressed logs upon failure to the specified location assuming machine/user has permission and network access to location.
Parameter | Description |
---|---|
Local file path or UNC network paths. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
Accepted parameters are local file paths and UNC network paths. Execution runs in the system context, so it may not have permissions to copy to locations that require user permissions.
/Debug
Enables kernel debugging over a communications (COM) port when Windows is running, and during the WindowsPE configuration pass of Windows Setup.
Parameter | Description |
---|---|
Specifies the debugging port. The default value is 1. | |
Specifies the baud to use when Windows transfers data during debugging. The default setting is 19200, but can also be set to 57600 or 115200. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | No |
setupconfig.ini files used for feature updates | No |
/DiagnosticPrompt
Specifies that the Command Prompt is available during Windows Setup.
Parameter | Description |
---|---|
Enable | The Command Prompt can be accessed by pressing Shift+F10 during Windows Setup. |
Disable | The Command Prompt is not available during Windows Setup. The Command Prompt wil not be available while offline and OOBE phases are running. This is the default setting. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
This option is available in Windows 10, Version 1703.
/DynamicUpdate
Specifies whether Windows Setup will perform Dynamic Update operations (search, download, and install updates).
Parameter | Description |
---|---|
Enable | Dynamic Update operations are performed. |
Disable | Dynamic Update operations are not performed. |
NoDrivers | Dynamic Update operations are performed except driver acquisition. |
NoDriversNoLCU | Dynamic Update operations are performed except driver and latest cumulative update acquisition. |
NoLCU | Dynamic Update operations are performed except latest cumulative update acquisition. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes for Microsoft Update (MU) based feature updates; Yes for Unified Updated Platform (UUP) based feature updates only when /DynamicUpdate NoDrivers is specified |
Remarks
NoDrivers, NoLCU and NoDriversNoLCU are new for Windows 10, version 2004. When NoDrivers, NoLCU or NoDriversNoLCU is specified, Dynamic Update operations will be performed but drivers and/or the latest cumulative update acquisition will not be performed. /DynamicUpdate can be used with /SkipFinalize to control Dynamic Update operations; /DynamicUpdate is ignored when used with /Finalize.
/EMSPort
Enables or disables Emergency Management Services (EMS) during Windows Setup and after the server operating system has been installed.
Parameter | Description |
---|---|
COM1 | Enables EMS over COM1. Supported for x86 systems only. |
COM2 | Enables EMS over COM2. Supported for x86 systems only. |
UseBIOSSettings | uses the setting that the BIOS specifies. For x86 systems, Windows uses the value from the Serial Port Console Redirection (SPCR) table. If no SPCR table or EFI console device path is specified in the BIOS, Windows disables EMS. |
Off | Disables EMS. If EMS is disabled in Windows Setup, you can later enable EMS by modifying the boot settings. |
Specifies the baud to use when Windows transfers data during debugging. The default value is 19200, but it can also be set to 57600 or 115200. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | No |
setupconfig.ini files used for feature updates | No |
/Finalize
Instructions Windows Setup to finish previously started update operations on the down-level OS, followed by an immediate reboot to start the offline phase.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | No |
Remarks
This option is new for Windows 10, version 2004. /Finalize should not be specified with the /NoReboot option. Windows Setup will return error MOSETUP_E_FINALIZE_RESUME_FAILURE (0xC1900132) if /Finalize is called and the device is not in the proper state to resume after running /SkipFinalize. See /SkipFinalize.
/ImageIndex
Instructions Windows Setup which OS image to install from install.wim if multiple images may be applicable.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes for Microsoft Update (MU) based feature updates; No for Unified Updated Platform (UUP) based feature updates |
Remarks
If multiple images are applicable, Windows Setup will prompt the user to select. If multiple images are applicable and Windows Setup is invoked with /Quiet, Windows Setup will fail with error MOSETUP_E_NO_MATCHING_INSTALL_IMAGE (0xC1900215). This may occur when the product key specified using /PKey applies to multiple OS images.
/InstallDrivers
Adds .inf-style drivers to the new Windows 10 installation.
Parameter | Description |
---|---|
Local file path or UNC network path to a folder that contains .inf files. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
This option is new for Windows 10. The driver .inf can be in a folder within the specified location. The command will recurse through the specified location.
/InstallFrom
Specifies a different Install.wim file to use during Windows Setup.
Parameter | Description |
---|---|
The path of the .wim file to install. |
This option also be used with split image files (.swm). Select the first split image file in the series
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | No |
Remarks
This enables you to use a single preinstallation environment to install multiple versions of Windows images. For example, you can use a 32-bit version of Windows Setup to deploy a 64-bit Windows image. You can also use an answer file for cross-platform deployments. For more information, see “Creating a WIM for Multiple Architecture Types” in Windows Setup Supported Platforms and Cross-Platform Deployments
/InstallLangPacks
Adds language packs (lp.cab) to the new Windows 10 installation.
Parameter | Description |
---|---|
Local file path or UNC network path to a folder that contains .inf files. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes for Microsoft Update (MU) based feature updates; No for Unified Updated Platform (UUP) based feature updates |
Remarks
This option is new for Windows 10. The language packs can be in a folder within the specified . The command installs all lp.cab files and language capabilities such as text-to-speech recognition, in the folder and subfolders at the specified . Language capabilities may have be dependent on other language capabilities. For example, Text-to-speech is dependent on the Basic component of the same language. Language capabilities should not be renamed within . See Language and region Features on Demand (FOD). In Windows 10, version 1903 and later, install failures will cause Windows Setup to fail and rollback.
Instructs Windows Setup to copy alternate files from an alternate location. This option instructs Windows Setup to look in the alternate location first, and, if files are present, to use them instead of the files from the default location.
Parameter | Description |
---|---|
Name and the location of the folder that contains the replacement files and can be any local drive location. UNC paths are not supported. |
Examples
To copy an updated C:\Program Files\Messenger\Msmsgs.exe file into the Windows installation, create the following folder structure on the Pro\Sources$OEM$$Progs\Messenger\Msmsgs.exe installation source by using the Setup command:
If you replace a file that Windows file protection protects, you must also copy the updated file to the local sources to be installed with Windows. For example, you may copy the file to the C:\Windows\i386 folder. The file name must be the same as the name that is used in Windows Setup. For example, add the following file and folder structure to your $OEM$ directory: Pro\sources$OEM$$$\i386\msmsgs.ex_. If you use files that are not on an installation share, you must specify the folder name. In this example the is C:\additional_files, where C:\additional_files is your customized $OEM$ directory. For example: C:\additional_files$$\i386\msmsgs.ex_.
If you change resources in your replacement files, you must add the updated Multilanguage User Interface (MUI) files to the installation.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | No |
setupconfig.ini files used for feature updates | No |
Remarks
You must know where the files will be installed on the Windows installation. All the additional files must be copied to an $OEM$ folder in your installation sources or in the . The $OEM$ structure provides a representation of the destination installation disk:
- $OEM$\$1 maps to %SYSTEMDRIVE%, which could be drive C.
- $OEM$\$$ maps to %WINDIR%, which could be C:\windows.
- $OEM$\$progs maps to the program files directory.
- $OEM$\$docs maps to the user’s My Documents folder.
/MigNEO
Tells Windows Setup to perform an upgrade of Windows without additional offline phase optimizations.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes only with /Auto Upgrade | DataOnly |
setupconfig.ini files used for feature updates | Yes only with /Auto Upgrade | DataOnly |
Remarks
NEO stands for Non-event Objective, a multi-release effort to reduce feature update offline time, including a single reboot for most users. This option is available in Windows 10, version 1803 and later.
/MigrateDrivers
Instructs Windows Setup whether to migrate the drivers from the existing installation during the upgrade.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
You can specify All or None. By default, Windows Setup decides which is best for each individual driver based on the install choice. You can use this switch with /InstallDrivers, though it’s not required.
/NetDebug
Enables kernel debugging over the network.
Syntax
/NetDebug:hostip= ,port= ,key= [,nodhcp][,busparams= ]
Parameter | Description |
---|---|
IP address of the host computer. | |
Port of the host computer. | |
Password to set up a secure connection. | |
Bus number, device number, and function number of an adapter for a specific PCI bus device.. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | No |
setupconfig.ini files used for feature updates | No |
Remarks
Use hostip to identify the IP address of the host computer. Use port to identify the port. The default start port is 49152, and the default end port is 65535. Use key to provide a password to set up a secure connection. Use nodhcp to avoid using a DHCP connection. (optional). Use busparams to select the bus number, device number, and function number of an adapter for a specific PCI bus device. (optional). For additional details, see Setting Up Kernel-Mode Debugging over a Network Cable Manually.
/NoReboot
Instructs Windows Setup not to restart the computer after the down-level phase of Windows Setup completes.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | No |
Remarks
This option is new for Windows 10. The /NoReboot option enables you to execute additional commands before Windows restarts. This option suppresses only the first reboot. The option does not suppress subsequent reboots.
Supplies Windows Setup with the specific product key.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
This option is new for Windows 10.
/Priority
Tells Windows Setup to increase the thread priority from low to normal for feature updates through Windows Update.
Parameter | Description |
---|---|
Normal | Windows Setup will execute with normal thread priority. |
Low | Windows Setup will execute with low thread priority. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
This option is available in Windows 10, version 1709 and later. Low priority is new for Windows 10, version 2004. Media based installations already run at Normal priority by default but can be decreased to Low priority.
/PostOOBE
After Windows Setup is complete, run a script.
Syntax
/PostOOBE [\setupcomplete.cmd]
Parameter | Description |
---|---|
Local file path or UNC network path to a file named setupcomplete.cmd or to a folder that contains setupcomplete.cmd. |
Path to folder that contains a script with the name setupcomplete.cmd. setupcomplete.cmd is copied to $Windows.
BT to be run after OOBE.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
This option is available in Windows 10.
/PostRollback
Instructs Windows Setup to run a script if the feature update fails to install and rolls back the changes, or if the user chooses to uninstall the feature update and go back to a previous version of Windows.
Syntax
/PostRollback [/PostRollbackContext
Parameter | Description |
---|---|
Local file path or UNC network path to a file named setuprollback.cmd, or to a folder that contains setuprollback.cmd. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
This option is available in Windows 10. /PostRollbackContext option is available in Windows 10, version 1803 and later. The /PostRollbackContext option allows you to specify whether the script runs in the context of the System account or the account of the signed in user. By default, updates from media run setuprollback.cmd in user context, which requires the first user who logs in post-upgrade to have administrator rights. For updates from Windows Update, setuprollback.cmd runs in system context, regardless of the rights of the first logged-in user. Windows Setup will copy setuprollback.cmd to $Windows.
BT to be run after OOBE.
/Quiet
This will suppress any Windows Setup user experience including the rollback user experience.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | No |
Remarks
This option is available in Windows 10.
/ReflectDrivers
Specifies the path to a folder that contains encryption drivers for a computer that has third-party encryption enabled.
Parameter | Description |
---|---|
Local file path or UNC network path to a folder that contains .inf files. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
This option is available in Windows 10, version 1607. Make sure that contains only a minimal set of encryption drivers. Having more drivers than necessary can negatively impact upgrade scenarios.
/ResizeRecoveryPartition
Specifies whether it’s OK to resize the existing Windows Recovery Environment (Windows RE) partition or create a new one during installation.
Parameter | Description |
---|---|
Enable | During installation, Windows can resize the existing Windows RE tools partition or create a new one if needed. |
Disable | Windows does not resize the existing Windows RE tools partition or create a new one during installation. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
/ShowOOBE
Specifies whether the user is required to interactively complete the out of box experience (OOBE).
Parameter | Description |
---|---|
Full | Requires the user to interactively complete the out of box experience (OOBE). |
None | Skips OOBE and selects the default settings. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
This option is available in Windows 10.
/SkipFinalize
Instructions setup to start update operations on the down-level OS without initiating a reboot to start the offline phase.
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | No |
Remarks
This option is available in Windows 10, version 2004. /SkipFinalize will prepare the update without committing. This allows for the commit to be completed using /Finalize followed by an immediate reboot of the device. This is the preferred approach to pending the update as the /NoReboot option will commit the changes but suppress the first reboot to allow for additional tasks. /SkipFinalize will not automatically instruct Windows Setup to run silently on the down-level OS while the computer is in use. Use /Quiet to suppress the Windows Setup user experience, and /Priority Low to prevent user impact. /SkipFinalize should not be specified with the /NoReboot option. See /Finalize.
/Telemetry
Specifies whether Windows Setup should capture and report installation data.
Parameter | Description |
---|---|
Enable | Windows Setup captures and reports installation data. |
Disable | Windows Setup does not capture and report installation data. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
/TempDrive
Instructs Windows Setup to put temporary installation files on the specified partition.
Parameter | Description |
---|---|
The partition to copy installation files to during Windows Setup. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
This option is available in Windows 10, version 1607. For an upgrade, the /TempDrive option affects only the placement of temporary files. The operating system is upgraded in the partition from which you run the setup.exe file.
/Unattend
Enables you to use an answer file with Windows Setup.
Parameter | Description |
---|---|
The file path and file name of the unattended Windows Setup answer file. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | No |
setupconfig.ini files used for feature updates | No |
Remarks
This is known as an unattended installation. You must specify a value for . Windows Setup applies the values in the answer file during installation. When /Unattend is used, /Auto cannot be used.
/Uninstall
Determines whether Windows will include controls that allow the user to go back to the previous operating system.
Parameter | Description |
---|---|
Enable | Windows Setup includes controls that allow the user to go back to the previous operating system. |
Disable | Windows Setup does not includes controls that allow the user to go back to the previous operating system. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | No |
Setup.exe started from Windows 10 | Yes |
setupconfig.ini files used for feature updates | Yes |
Remarks
This option is available in Windows 10.
/USBDebug
Sets up debugging on a USB port.
Parameter | Description |
---|---|
The name of the computer to debug. |
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | No |
setupconfig.ini files used for feature updates | No |
Remarks
Debug data is effective on the next reboot.
/WDSDiscover
Specifies that the Windows Deployment Services (WDS) client should be in discover mode.
Examples
To start the WDS client in dynamic discover mode, run the following command:
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | No |
setupconfig.ini files used for feature updates | No |
Remarks
If you do not specify /WDSServer WDS searches for a server.
/WDSServer
Specifies the name of the Windows Deployment Services (WDS) server that the client should connect to.
Parameter | Description |
---|---|
The name of the Windows Deployment Services server. |
Examples
To start the Windows Deployment Services client in static discover mode, run the following command:
Configuration | Applicable |
---|---|
Setup.exe started from WinPE | Yes |
Setup.exe started from Windows 10 | No |
setupconfig.ini files used for feature updates | No |
Remarks
To use this setting, you must also use the /WDSDiscover option. can be an IP address, a NetBIOS name, or a fully qualified domain name (FQDN).