Main Content

mps-service

Create or modify Windows service for server instance from command line on Windows systems

Description

mps-service [-C [path\]server_name] create [--name name] [--description description] [--user user] [--password password] [--noprompt] creates a Windows® service for the server instance.

The Windows service default settings are:

  • Service Display Name: MATLAB Production Server – path\server_name

  • Service Description: MATLAB Production Server running instance path\server_name

  • Service User: LocalSystem

The Windows service is configured to start when the machine starts, not at creation of the service. After you have made configuration changes, start the server instance using mps-start.

mps-service [-C [path\]server_name] update [--name name] [--description description] [--user user] [--password password] [--instance-root new_path] [--noprompt] updates the Windows service entry for the server instance.

mps-service [-C [path\]server_name] delete deletes the Windows service entry for the server instance. If you use the dashboard to create and start server instances, do not use mps-service to delete server instances.

mps-service delete service_name [[--force]|[-f]] deletes the Windows service entry by name. If you use the dashboard to create and start server instances, do not use mps-service to delete server instances.

mps-service clean [[--force]|[-f]][[--verbose]|[-v]] deletes invalid Windows service entries.

Invalid Windows service entries are entries where either the target version of MATLAB® Production Server™ is not present or the associated server instance no longer exists.

mps-service [-C [path\]server_name] undelete restores the deleted Windows service entry for the server instance.

mps-service [-C [path\]server_name] displays the Windows service entry for the server instance.

mps-service list lists the Windows service entries for all server instances.

Input Arguments

-C path\

Path to server instance

server_name

Name of the server instance

--name name

Display name for the Windows service associated with the server instance

--description description

Informational statement describing the Windows service associated with the server instance

--user user

Windows account under which the service associated with the server instance should run. The user account must have read, write, and, delete permissions for the instance directory as well read and execute permissions for the MATLAB Production Server installation directory.

--password password

Password for the service user account

--instance-root new_path

Updated path to server instance

--noprompt

Indicate that no prompts are generated

--force, -f

Force deletion without prompting

--verbose, -v

Include details about why the service is not valid.

Examples

expand all

To create a default Windows service for the server instance server_1 located in a folder tmp, type the following at the system command line:

mps-service -C tmp\server_1 create

To delete the Windows service entry for the server instance server_1 located in a folder tmp, type the following at the system command line:

mps-service -C tmp\server_1 delete

To list the Windows service entries for all the server instances installed on the local machine, type the following at the system command line:

mps-service list
Service Name:  MATLAB Production Server {01234567-89ab-cdef-0123-456789abcdef}
Display Name:  MATLAB Production Server - My Custom Name
Description:   My Description
Instance Root: C:\instances\instance1
MPS Root:      C:\Program Files\MATLAB\MATLAB Production Server\R2014b
Status:        Started

Service Name:  MATLAB Production Server {01234567-89ab-cdef-0123-456789abcdef}
Display Name:  MATLAB Production Server - c:\instances\instance2
Description:   MATLAB Production Server running instance C:\instances\instance2
Instance Root: C:\instances\instance2
MPS Root:      C:\Program Files\MATLAB\MATLAB Production Server\R2024b
Status:        Stopped

Version History

Introduced in R2015a