Description
Executes scripts for managed servers.
Synopsis
[Windows]
swcfmg_script_execute.exe -userid <User ID> {-serverid <Server ID> | -ip <IP address>} -script <Script path> [-monitor <Monitoring time>] [-sgluser] [-reboot] [-wait] |
[Linux]
swcfmg_script_execute -userid <User ID> {-serverid <Server ID> | -ip <IP address>} -script <Script path> [-monitor <Monitoring time>] [-sgluser] [-reboot] [-wait] |
Options
Performs script execution. Specify the user to be the job administrator of the scripts executed for the user ID. The user must be a tenant administrator, tenant user, or a dual-role administrator that holds privileges to execute the scripts for the specified server.
Specify the server ID or IP address of the server which will execute the scripts.
Specify the script to execute for the script path.
You can specify the execution method by specifying the options below:
Executes the script in single-user mode. When this option is specified, the script is executed in single-user mode. After the script is executed, the mode is switched back to the previous mode. When this option is omitted, the script is executed without the switchover of modes.
This option restarts the server after script execution. If this option is omitted, servers are not restarted.
When the job turns to the following status, the command returns. When this option is omitted, after the job starts, the command returns immediately.
completed: Completed
selecting_abnormal: Selecting (abnormal)
completed_abnormal: Completed (abnormal)
canceled: Canceled
After this command completes, script execution is executed as a job. The job ID of the job to be executed is output to the standard output.
Output format for standard output:
[Job ID] |
Return value
Return value | Meaning |
---|---|
0 | The command has terminated normally. [When specifying the "-wait" option] The status of the job turned to Complete. |
10 | A parameter error has occurred. |
20 | The specified I/O path is incorrect. |
50 | The file description is incorrect. |
70 | The specified user or server is incorrect. |
81 | You do not have the privileges required to apply scripts. |
90 | [When specifying the "-wait" option] The status of the job turned to Selecting (abnormal). |
91 | [When specifying the "-wait" option] The status of the job turned to Completed (abnormal). |
92 | [When specifying the "-wait" option] The status of the job turned to Canceled. |
100 | Systemwalker Software Configuration Manager is not running. |
103 | Connection to the directory service failed. |
104 | The operation is not permitted for the admin server. |
200 | Setup has not been performed. |
255 | A system error has occurred. |
Command location
Admin server
[Windows]
<Systemwalker Software Configuration Manager installation directory>\SWCFMGM\bin |
[Linux]
/opt/FJSVcfmgm/bin |
Privilege required
[Windows]
Administrator privileges are required. Execute as an administrator.
This command can be executed on the admin server.
This command can be executed at the same time as other commands.
[Linux]
This command can only be executed by the system administrator (superuser).
This command can be executed on the admin server.
This command can be executed at the same time as other commands.
Notes
Execute this command while Systemwalker Software Configuration Manager is running.
Scripts cannot be executed for the admin server.
Example
[Windows]
swcfmg_script_execute.exe -userid user001 -ip 192.168.1.1 -script C:\work\script.bat |
[Linux]
swcfmg_script_execute -userid user001 -ip 192.168.1.1 -script /tmp/script.sh |