Hello,
please how can I start xms-tools (xms.bat) from command line while providing username, password and command which I want to execute?
I'm using xms 1.1
thanks in advance
Bilak,
Please take a look at install videos posted at
https://community.emc.com/community/edn/documentum/blog/2014/02/11/how-to-xms
-harsh
Harsh,
I know how to manage xms, but my question is about that if it is possible to put some parameters to command line.
like this:
xms.bat --password password --username username --blablabla...
It's not working I think.
I don't think it is possible out of the box, you may have to modify the bat file.
I will check if what you are suggesting is an option at all
-HH
Enjoy.
@ECHO OFFMODE 110SET XMS_OPTS=-Xmx512m -XX:MaxPermSize=128mSET XMS_TOOLS_HOME="%CD:~0,-4%"SET LIB_PATH=%XMS_TOOLS_HOME%\libSET CONFIG_PATH=%XMS_TOOLS_HOME%\configSET CLASSPATH=%CONFIG_PATH%;%CONFIG_PATH%\system;%CONFIG_PATH%\properties;%LIB_PATH%\*;%LIB_PATH%\axis\*;%LIB_PATH%\commons\*;%LIB_PATH%\hyperic\*;%LIB_PATH%\jaxb\*;%LIB_PATH%\spring\*;%LIB_PATH%\vcloud\*;%LIB_PATH%\velocity\*;%LIB_PATH%\vix\*;%LIB_PATH%\xdb\*;%LIB_PATH%\recipes\dfc\*IF "%JAVA_HOME%" == "" ( ECHO JAVA_HOME not set GOTO END)IF NOT EXIST %XMS_TOOLS_HOME%\logs\ MKDIR %XMS_TOOLS_HOME%\logs"%JAVA_HOME%"\bin\java.exe -version > %XMS_TOOLS_HOME%\logs\java_version.txt 2>&1FIND "1.6" %XMS_TOOLS_HOME%\logs\java_version.txt >nulIF ERRORLEVEL 1 ( ECHO JAVA_HOME should point to java 1.6 GOTO END):LoopIF "%1"=="" GOTO Continue IF "%1" == "--username" ( SET USERNAME=-Dxms.username=%2 SHIFT ) IF "%1" == "--password" ( SET PASSWORD=-Dxms.password=%2 SHIFT ) IF "%1" == "--inputfile" ( SET INPUTFILE=-Dxms.input.file=%2 SHIFT ) IF "%1" == "--command" ( SET COMMAND=%~2 SHIFT )SHIFTGOTO Loop:ContinueIF "%xms_mode%" == "" ( SET xms_mode=server)IF NOT "%COMMAND%" == "" ( ECHO %COMMAND% > "%TEMP%\xmsinput.txt" ECHO exit >> "%TEMP%\xmsinput.txt" SET INPUTFILE=-Dxms.input.file="%TEMP%\xmsinput.txt")"%JAVA_HOME%"\bin\java.exe %XMS_OPTS% -classpath %CLASSPATH% %USERNAME% %PASSWORD% %INPUTFILE% -Dxms.tools.home=%XMS_TOOLS_HOME% -Dxms.mode=%xms_mode% com.documentum.xms.cli.XmsConsoledel /Q "%TEMP%\xmsinput.txt" >NUL 2>&1SET XMS_OPTS=SET xms_input_file=SET xms_mode=:END
thank you Andrew
can you tell me how xmsinput.txt file looks like?
do you have something like this inside it?
war-file=
configuration-file=
environment=
deployment-method=
...
command should be like this:
n_xms.bat --username dmadmin --password dmadmin --operation deploy-xcp-application --inputfile c:/xmsinput.txt
Thanks
my script is based on xms.bat from 1.0 release, I'm not sure that it's compatible with 1.1, but it demonstrates the main idea: xms main class accepts -Dxms.username, -Dxms.password and -Dxms.input.file system properties. So my script parses command-line arguments and passes its to xms class, example of invocation:
xms.bat --password password --username admin --command "show-users"
you can also create your own inputfile (it should contain the list of xms commands) and execute script in following manner:
xms.bat --password password --username admin --inputfile path