Let’s learn how to add Run Command Line Step to SCCM Task Sequence. The command line added to SCCM task sequence must be installed silently when you decide to add during the OS deployment.
This option helps SCCM Admin to perform various operations easily during the operating system deployment with Task sequence. The details to post will provide you insights about the available option with this step. As per Microsoft posts, The command being run must meet the following criteria –
- Command line added to this step shouldn’t interact with the desktop. The command must run silently or in an unattended mode.
- It must not initiate a restart on its own. The command must request a restart using the standard restart code, 3010. This behavior makes sure that the task sequence properly handles the restart. If the command does return a 3010 exit code, the task sequence engine restarts the computer. After the restart, the task sequence automatically continues.
How to Add Run Command Line Step to SCCM Task Sequence
Let’s follow the below steps to add Run Command Line in Task sequence and learn about the available options –
Note – You can run this step in the full OS or Windows PE.
Create or Edit an Existing Task Sequence
This Guide will help you to create a Configuration Manager task sequence from scratch. Use the following steps to modify an existing task sequence –
- In the Configuration Manager console, go to the Software Library workspace, expand Operating Systems, and then select the Task Sequences node.
- In the Task Sequence list, select the task sequence that you want to edit. Select Edit to modify.
- To add this step in the task sequence editor, select Add, select General, and select Run Command Line.
Properties for Run Command Line
- On the Properties tab for Run Command Line step, You can configure the following settings –
- Command line
- Output to task sequence variable
- Disable 64-bit file system redirection
- Start in
- Time-out (minutes)
- Run this step as the following account (Account)
Note – Assign the proper Name, Description for step. This helps you to track and troubleshoot in case of any failure.
Here, you can specify the command line that the task sequence runs with filename extensions or directly paste the line in the proper format, which you can execute using the command-line options.
Output to task sequence variable
You can use this setting to save the command output to a custom task sequence variable.
Disable 64-bit file system redirection
By default, 64-bit operating systems use the WOW64 file system redirector to run command lines. This behavior is to find 32-bit versions of OS executables and libraries properly. Select this option to disable the use of the WOW64 file system redirector. Windows runs the command using native 64-bit versions of OS executables and libraries. This option has no effect when running on a 32-bit OS.
This field is optional. You can specify the executable folder for the program, up to 127 characters. This folder can be an absolute path on the destination computer or a path relative to the distribution point folder that contains the package.
When you specify files or programs on the command line that aren’t already present on the destination computer, select this option to specify the Configuration Manager package that contains the necessary files. The package doesn’t require a program. If the specified files exist on the destination computer, this option isn’t required.
In this example, the package referenced has files reference to the command line (DefaultApps.bat).
This option is disabled by default. Specifies a value that represents how long Configuration Manager allows the command line to run. This value can be from one minute to 999 minutes. The default value is 15 minutes.
Run this step as the following account (Account)
Here you can specify the local user or domain account to run the command line. The command line runs with the permissions of the specified account. Select Set to specify the account.
Options for Run Command Line
On the Run Command Line step, Options tab. Here you can configure the additional settings of this task sequence step –
Continue on error – When you select Continue on error on the Options tab of this step, the task sequence continues when a command line fails to execute. When you don’t enable this option, the task sequence fails and will not execute the remaining steps.
About Author -> Jitesh has over 5 years of working experience in the IT Industry. He writes and shares his experiences related to Microsoft device management technologies and IT Infrastructure management. His primary focus area is Windows 10 Deployment solution with Configuration Manager, Microsoft Deployment Toolkit (MDT), and Microsoft Intune.
- Easily Find SCCM Task Sequences Reference Application
- Available Options for SCCM Install Application Task Sequence Step