Command-line interface for administrative tasks

You can use the eShareAdmin.exe tool of the eShare server to perform various administrative tasks from the command line. Typically the tool is located in \Program Files\Cadmatic\eShareAdminTools\eShareAdmin\.

Run the tool without any options or parameters to display usage instructions:

eShareAdmin

Run the tool with the required option and parameters to perform a task:

eShareAdmin <option> <parameters>

The tool supports the following options and parameters.

Option

Parameters

Description

-p

uri

Lists the names of all eShare projects.

uri – Specify the URI of the eShare server.

-u

uri projectname filename [modelImporterId] [--uploadOnly]

Uploads a model from the given filename file to the specified eShare project.

projectname – Specify the project to which to add the model.

filename – Specify the path and filename of the model to upload.

modelImporterId – Specify the model importer to use. If not specified, the default EBM importer is used.

--uploadOnly – Will not perform the publish, just uploads the model.

-g

[-c] uri groupname [projectname]

Imports users from a domain or machine group specified in groupname.

-c – (Optional) Use this parameter to create an eShare user group that has the same name as the imported group, and to add the imported users to this eShare user group. If the users already exist in eShare, they are added to this group. If the group already exists, an error message is displayed. If you specify a project in the projectname parameter, the user group is added as a user to that project.

groupname – Specify the domain name or computer name and the name of the group from which to import users: 
"DOMAIN_NAME\Group Name"
"COMPUTER_NAME\Group Name"

projectname – (Optional) Specify the project to which to add the users or (if using the -c parameter) the user group.

Do not use the parameters -c and -s at the same time.

[-s] uri groupname [projectname]

Synchronizes Active Directory (AD) groups to eShare groups.

-s – (Optional) Use this parameter to add users from an AD group to eShare. The parameter creates an eShare group if one does not exist yet, and adds or removes users from the eShare group to match the AD group if the group with the same name exists. Using the parameter does not remove user accounts from eShare.

groupname – Specify the domain name or computer name and the name of the group from which to import users: 
"DOMAIN_NAME\Group Name"
"COMPUTER_NAME\Group Name"

Do not use the parameters -c and -s at the same time.

-t

[-t]

Supplies the JSON Web Token for Azure Active Directory (AD) that is defined in system administration user interface in eShare.

Examples

To run a command, you need to know the URI of the CADMATIC eShare server. In the examples below the server address and port is localhost:81.

  • List all projects in a given eShare server:

    eShareAdmin -p http://localhost:81

  • Update the 3D model of a project by uploading a model file:

    eShareAdmin -u http://localhost:81 MyProject MyModel.ebm

  • Import users from a domain group:

    eShareAdmin -g http://localhost:81 "My_Domain\My Group"

  • Import users from a domain group to an eShare user group by the same name, and add the user group (not the individual users) to a project:

    eShareAdmin -g -c http://localhost:81 "My_Domain\My Group" MyProject

  • Synchronizes AD groups to eShare groups: 

    eShareAdmin -g -s http://localhost:81 "MyDomain\My Group" MyProject

  • Supplies the Azure Active Directory (AD) token:

    eShareAdmin -p http://localhost:81 -t <token>