CLI Utils

There are some CLI programs that can help you to configure different values of your DMS system.

adduser

adduser.exe: with this CLI program, you can create a new user in the DMS system.

If you run this command without parameters, like this:

adduser.exe

you can see the documentation to execute this command correctly. Here an example:

There are some required parameters:

  • -username or -u (required) UserName of the user with the admin role
  • -password or -p (required) Password of the user with the admin role
  • -newusername or -nu (required) UserName for the new user
  • -userpassword or -np (required) The password for the new user

Moreover, there are some optional parameters:

  • -disabled or -d (optional) A boolean value that indicates if the new user is disabled, default value is false (user enabled)
  • -roles or -r (optional) A comma separated string with all the roles for the new user (example “monitor, sender”), default is empty
  • -endpoint or -e (optional) The url where the DMS server is located, if not set default ishttps://localhost/authrpc

An example of the extended command is:

adduser.exe -username <username> -password <password> -newusername <new username> -userpassword <new password> -roles <comma separated existents roles> -endpoint <https://localhost/authrpc>

or in short version:

adduser.exe -u <username> -p <password> -nu <new username> -np <new password> -r <comma separated existent roles> -e <https://localhost/authrpc>

deluser

deluser.exe deletes a user from the DMS system.

If you run this command without parameters, like this:

deluser.exe

you can see the documentation to execute this command correctly, here an example:

There are some required parameters:

  • -username or -u (required) UserName of the user with the admin role
  • -password or -p (required) Password of the user with the admin role
  • -usertodel or -ud (required) UserName of the user to delete

Moreover, there are some optional parameters:

  • -endpoint or -e (optional) The url where the DMS server is located, if not set default ishttps://localhost/authrpc

An example of the extended command is:

deluser.exe -username <username> -password <password> -usertodel <username to delete> -endpoint <https://localhost/authrpc>

or in short version:

deluser -u <username> -p <password> -ud <username to delete> -e <https://localhost/authrpc>

addcontext

addcontext.exe adds a context in the DMS system.

If you run this command without parameters, like this:

addcontext.exe

you can see the documentation to execute this command correctly, here an example:

There are some required parameters:

  • -username or -u (required) UserName of the user with the admin role
  • -password or -p (required) Password of the user with the admin role
  • -context or -c (required) The new Context name

Moreover, there are some optional parameters:

  • -contextdata or -cd (optional) A string of a JSONObject with the context data of the new context, default is empty
  • -endpoint or -e (optional) The url where the DMS server is located, if not set default ishttps://localhost/authrpc

An example of the extended command is:

addcontext.exe -username <username> -password <password> -context <context name> -contextdata <string of JSONObject> -endpoint <https://localhost/authrpc>

or in short version:

addcontext -u <username> -p <password> -c <context name> -e <https://localhost/authrpc>

delcontext

delcontext.exe deletes a context from the DMS system.

If you run this command without parameters, like this:

delcontext.exe

you can see the documentation to execute this command correctly, here an example:

There are some required parameters:

  • -username or -u (required) UserName of the user with the admin role
  • -password or -p (required) Password of the user with the admin role
  • -contextname or -c (required) The Context name to delete

Moreover, there are some optional parameters:

  • -endpoint or -e (optional) The url where the DMS server is located, if not set default ishttps://localhost/authrpc

An example of the extended command is:

delcontext.exe -username <username> -password <password> -contextname <context name to delete> -endpoint <https://localhost/authrpc>

or in short version:

delcontext -u <username> -p <password> -c <context name to delete> -e <https://localhost/authrpc>

moduser

moduser.exe edits some information about a user.

If you run this command without parameters, like this:

moduser.exe

you can see the documentation to execute this command correctly, here an example:

As you can see, there are different commands:

  • changepwd changes the password to “user to change”
  • changeroles changes the roles of the “user to change”
  • changestatus enables or disables user
  • changeusercontext adds or removes context to “user to change”

[command] changepwd

changepwd changes a user password via command line. Only administrators can run this CLI util. Even if It can be used to handle users from command line, It has been specifically designed to be embedded into custom setup for software systems which make use of DMSContainer.

If you run this command without parameters, like this:

moduser.exe changepwd

you can see the documentation to execute this command correctly, here an example:

There are some required parameters:

  • -username or -u (required) UserName of the user with the admin role
  • -password or -p (required) Password of the user with the admin role
  • -usertochange or -uc (required) UserName of the user whose status has to be changed
  • -newpassword or -np (required) The new password we want to give to the user

Moreover, there are some optional parameters:

  • -endpoint or -e (optional) The url where the DMS server is located, if not set default ishttps://localhost/authrpc

There is also an example of usage, like this:

moduser.exe changepwd -username <username> -password <password> -usertochange <username to edit> -newpassword <newpassword> -endpoint <https://localhost/authrpc>

or in short version:

 moduser changepwd -u <username> -p <password> -uc <username to edit> -np <newpassword> -e <https://localhost/authrpc>

If the operation is successful the program ends with code 0 otherwise it exits with code 1 and shows the error.

[command] changeroles

changeroles is used to add or delete roles to user via command line. Only administrators can run this CLI util.

All old roles of the user will be overwritten.

If you run this command without parameters, like this:

moduser.exe changeroles

you can see the documentation to execute this command correctly, here an example:

There are some required parameters:

  • -username or -u (required) UserName of the user with the admin role
  • -password or -p (required) Password of the user with the admin role
  • -usertochange or -uc (required) UserName of the user whose status has to be changed
  • -roles or -r (required) Comma separated string with all roles of the “user to change”

Moreover, there are some optional parameters:

  • -endpoint or -e (optional) The url where the DMS server is located, if not set default ishttps://localhost/authrpc

There is also an example of usage, like this:

moduser.exe changeroles -username <username> -password <password> -usertochange <username to edit> -roles <comma separated list of all roles for this user to change> -endpoint <https://localhost/authrpc>

or in short version:

moduser changeroles -u <username> -p <password> -uc <username to edit> -r <comma separated list of all roles for this user to change> -e <https://localhost/authrpc

If the operation is successful the program ends with code 0 otherwise it exits with code 1 and shows the error.

[command] changestatus

changeuserstatus is used to enable or disable user via command line. Only administrators can run this CLI util. Even if It can be used to handle users from command line, It has been specifically designed to be embedded into custom setup for software systems which make use of DMSContainer.

If you run this command without parameters, like this:

moduser.exe changestatus

you can see the documentation to execute this command correctly, here an example:

There are some required parameters:

  • -username or -u (required) UserName of the user with the admin role
  • -password or -p (required) Password of the user with the admin role
  • -usertochange or -uc (required) UserName of the user whose status has to be changed
  • -status or -s (required) The new Status for the “user to change”, allowed values are «enable» or «disable»

Moreover, there are some optional parameters:

  • -endpoint or -e (optional) The url where the DMS server is located, if not set default ishttps://localhost/authrpc

There is also an example of usage, like this:

moduser.exe changestatus -username <username> -password <password> -usertochange <username to edit> -status <enable or disable> -endpoint <https://localhost/authrpc>

or in short version:

moduser changestatus -u <username> -p <password> -uc <username to edit> -s <enable or disable> -e <https://localhost/authrpc>

If the operation is successful the program ends with code 0 otherwise it exits with code 1 and shows the error.

[command] changeusercontext

changeusercontext is used to add or remove context to user via command line. Only administrators can run this CLI util.

Even if It can be used to handle users from command line, It has been specifically designed to be embedded into custom setup for software systems which make use of DMSContainer.

If you run this command without parameters, like this:

moduser.exe changeusercontext

you can see the documentation to execute correctly this command, here an example:

There are some required parameters:

  • -username or -u (required) UserName of the user with the admin role
  • -password or -p (required) Password of the user with the admin role
  • -usertochange or -uc (required) UserName of the user whose status has to be changed
  • -contexname or -c (required) The name of the Context to Add or Remove at “user to change”
  • -action or -a (required) The action to Add or Remove a context to a “user to change”

Moreover, there are some optional parameters:

  • -endpoint or -e (optional) The url where the DMS server is located, if not set default is https://localhost/authrpc

There is also an example of usage, like this:

moduser.exe changeusercontext -username <username> -password <password> -usertochange <username to edit> -contextname <contextname> -action <add or remove> -endpoint <https://localhost/authrpc>

or in short version:

moduser changeusercontext -u <username> -p <password> -uc <username to edit> -c <contextname> -a <add or remove> -e <https://localhost/authrpc>

If the operation is successful the program ends with code 0 otherwise it exits with code 1 and shows the error.

esproducer

esproducer.exe is a small utility which can help to understand and develop solution based on the eventstream module. It can produce messages and append them into a specified queue. The messages have a specified format with a single property named "value" containing what has been inserted in the command line.

esconsumer

esconsumer.exe is a small utility which can help to understand and develop solution based on the eventstream module. It can consume an arbitrary queue and show the messages dequeues directly on the console.

licenseinfo

licenseinfo.exe is a small utility useful to understand your license status. Just running licenseinfo.exe from the command line, you get all the information related to your current license including running and available istances. Here’s a licenseinfo.exe sample output.

{                                                                                         
        "customer": "PETER PARKER",
        "email": "p.parker@bittime.it",
        "license": "professional",
        "expiration": "2025-12-31",
        "description": "PETER PARKER up to 2025-12-31 (License level: professional)",
        "dmscontainer": {
                "version": "Delphi Microservices Container 4.1.86",
                "compiler": "Delphi 11.x ALEXANDRIA"                       
        },                                      
        "instances": {
                "allowedinstances": 20,
                "runninginstances": 12
        }
}                                                                                         

licenseinfo.exe is available since DMSContainer 4.1.45.