The documentation for "Teamcenter Integration from Teamcenter" explains several ways to launch the Teamcenter Integration from the command line and also an example of a batch file to log in to Teamcenter is included (see Teamcenter Integration for NX - Example of login file).
The documentation mentions the utility ugraf.exe and there is no information available how to run other NX utilities (e.g. ugclone.exe) in a managed environment.
The included example of the batch file and the mentioned variables are also applicable to other NX utilities like ugclone.exe.
Running ugclone.exe in 2-tier Teamcenter setup
set UGII_BASE_DIR=D:\apps\PLM_x64\NX2312
set FMS_HOME=D:\apps\PLM_x64\TC\tc_root\tccs
set TC_ROOT=D:\apps\PLM_x64\TC\tc_root
set TC_DATA=D:\apps\PLM_x64\TC\tc_data\model
%UGII_BASE_DIR%\NXBIN\ug_clone.exe -pim=yes -u=<user ID> -p=<password> -o=export -default_n=autotranslate -part=@DB/000022/A
Running ugclone.exe in 4-tier Teamcenter setup
set UGII_BASE_DIR=D:\apps\PLM_x64\NX2312
set FMS_HOME=D:\apps\PLM_x64\TC\tc_root\tccs
set UGII_UGMGR_HTTP_URL=http://decgnsrv:8080/tc
%UGII_BASE_DIR%\NXBIN\ug_clone.exe -pim=yes -u=<user ID> -p=<password> -o=export -default_n=autotranslate -part=@DB/000022/A
Running ugclone.exe with TCCS setup
set UGII_BASE_DIR=D:\apps\PLM_x64\NX2312
set FMS_HOME=D:\apps\PLM_x64\TC\tc_root\tccs
set UGII_TCCS_ENV_NAME=ENV_PRD
%UGII_BASE_DIR%\NXBIN\ug_clone.exe -pim=yes -u=<user ID> -p=<password> -o=export -default_n=autotranslate -part=@DB/000022/A