Setting environment system variables in a task sequence

Setting environment system variables in a task sequence

One way to set a environment system variable during a MDT or SCCM Task Sequence is to use the SETX command. http://technet.microsoft.com/en-us/library/cc755104(v=ws.10).aspx

This command SETX LLVAR TEST /M will set the variable LLVAR to the value TEST

image

If we take a closer look at the System variables after this step, we will see that the variable has been defined and the value set to TEST:

image

We can also use existing system variables, this command will add a new directory path to the existing System variable PATH using the existing value of both %PATH% and %PROGRAMFILES(X86)% in the command.

image

Table of Contents

Share this post
Search blog posts
Authors
Modern Workplace consultant and a Microsoft MVP in Enterprise Mobility.
Modern Workplace consultant and a Microsoft MVP in Windows and Devices for IT.

Infrastructure architect with focus on Modern Workplace and Microsoft 365 security.

Passionate IT professional with 20+ experience in IT architecture, consulting, and design. 

Cloud & security specialist with focus on Microsoft backend products and cloud technologies.

Infrastructure architect with focus on design, implementation, migration and consolidation.

Infrastructure consultant with focus on cloud solutions in Office365 and Azure.

follow us in feedly
Categories

Follow on SoMe