Run Multiple Commands from a Single Run Command Line Task in an SCCM 2012 Task Sequence

When building an SCCM 2012 task sequence, a Run Command Line task can be added to execute CMDs:


When needing to run multiple commands, adding a separate Run Command Line tasks for each command will work.  But sometimes combining multiple commands into a single step will be more efficient.

The & Operator

Multiple commands can be ran within one Run Command Line task by separating commands with the & operator.  For example, the following command will make a directory and then copy a file to it:

md C:\Temp & copy file.txt C:\Temp\file.txt


Use this technique to clean up and optimize task sequences that run multiple commands.

This same operator can also be used when executing commands from a regular Windows command prompt.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: