You can send commands to the VirtServer application from the command line. The main purpose is to manage licenses and users that can work with virtual services. To work with virtual services, for example, deploy or undeploy them, you use a separate command-line utility.
In general, the command-line syntax is as follows:
virtserver [options] [<settings-file>]
Here is the list of available command-line options:
|Short Form||Long Form||Description|
|The name of the settings file (.yml) that VirtServer will use for work. If you skip the file name, VirtServer will load the file from the default location to which the file is installed. See VirtServer Settings File for details.|
|-a <user>||–adduser <user>||Registers a user with the specified name on VirtServer. VirtServer will then ask you to specify a user password. The password cannot be an empty string. You need to have at least one user to connect to your VirtServer from the ReadyAPI Virtualization panel.|
|-d <user>||Deletes (unregisters) the specified user. You do not need a user password to do this.|
|-e <user>||–edituser <user>||Changes the password of the specified user. After you send the command, VirtServer will ask you to specify a new password.|
|-h||–help||Displays information on available command-line arguments.|
|-u||–listusers||Lists all users registered on VirtServer.|
|-x||–deactivatelicense||Deactivates your current VirtServer license.|
Here are some examples of how you can work with VirtServer via command line:
Deactivate a license
The following command deactivates the VirtServer license:
After you execute this command line, VirtServer will ask you to confirm that you want to deactivate the license.
Add a new user
The following command will add a JohnSmith user to your VirtServer instance:
After running this command line, you will need to specify the user password.
Edit user data
The following command line edits the password of the JohnSmith user. The command must reference to an existing user:
After you run this command, VirtServer will ask you to specify a new password.