I've been using SAS EG for a while, and want to try batch work arrangement by windows CLI(for some permission level restriction I can't use scheduls in SAS EG...).
But I have to connect to metadata sever every time I start EG, which I don't know how to finish in command line, I guess there should be some sas.exe parameters to set up the "bridge" connection with [remote server address, port, user name, password...]
The SAS session that Enterprise Guide connects to is a Workspace Server. The Workspace Server establishes a connection to the Metatdata Server by way of the Lev1/metadataConfig.xml file that is called by the METAPROFILE in Lev1\SASApp\sasv9.cfg. This establishes a connection to the Metadata Server using the connection details in that XML file as the process owner or in the case of SAS Token Authentication using a one-time password for the user who requested the server from the Object Spawner.
To connect to Metadata from a SAS session started in batch you could use the Batch Server to start SAS (i.e. Lev1\SASApp\BatchServer\sasbatch.cmd) which would also load that metaprofile option, or in a SAS session started from <SASHome>\SASFoundation\9.4\sas, use the metadata connection options (e.g. metaprofile, or metaserver/metaport/metauser/metapass).