For details of how to obtain this utility, please see Installing Nomad tools for operating system deployment.
TSEnv2 is an executable that can be used primarily to set or change task sequence environment variables (including "readonly" variables, those starting with an underscore, which cannot be changed with ConfigMgr's tsenv,exe tool), but it also has other related functions.
Some functions can also be performed by the NomadPackageLocator tool.
The format of the command-line is as follows: TSEnv2.exe switch
where switch
is one of the following switches.
Switch | Description |
---|---|
dump [file] | Write a binary dump of the TS variables to a file. If no file name is given, the default is C:\tsenv2.out . |
find name | Test whether the specified variable exists and has a non-empty value. If so, the return code is 0 , otherwise it is 0x80070490 (2147943568) which corresponds to ELEMENT_NOT_FOUND . |
get name | Get the name of the specified variable and output it in the form name=value . The return code is 0 if the variable exists and has a non-empty value, otherwise it is 0x80070490 (2147943568) which corresponds to ELEMENT_NOT_FOUND . |
get_b64 name | Like |
get_b64z name | Like |
list | Outputs every variable in the form name=value with one name-value pair per line. |
listblk | Like list but uses a different block-based technique. The result is always be the same. |
listx | Like list but base-64 encoded variables (encoded values start with "eJ") are also decoded and uncompressed. |
set name=value | Creates or changes the named variable using the specified value. Values up to 2954 characters are supported. If the value contains embedded whitespace or quote characters, enclose the entire |