Using the server command line — Windows
You can use the command line to manage the P4 Plan server.
Run commands from the HPMServer executable, which is in the directory where the P4 Plan server is installed.
The default location is C:\Program Files (x86)\P4 Plan\Project Manager Server. If a translated build (not default English) is installed, the default location is C:\P4 Plan\Project Manager Server.
Example
The following command adds the HPMServer to the system as a service named MyServer01.
HPMServer -AddService MyServer01
Commands
| Command | Description |
|---|---|
| -AddService [ServiceName] | Adds the current executable to the system as a service. |
| -AddServiceIfNotAdded [ServiceName] | Adds the current executable to the system as a service if one with the same name does not exist. |
| -RemoveService [ServiceName] | Removes the program from the system service list. |
| -StartService [ServiceName] | Starts the service. |
| -StopService [ServiceName] | Stops the service. |
| -RunAsProgram | Runs theP4 Plan server as a usual program in the background. |
| -Service [ServiceName] | Starts the program as a service. Only used by the system. |
| -ConfigGui | Runs the initial configuration user interface. |
| -BackupAllDatabases [ServiceName] | Stops listening for connections, gracefully logs out all users, and then performs a backup of all online databases. |
| -BackupAndStop [ServiceName] | The same as -BackupAllDatabases, but also stops the service after all database backups are finished. Run before upgrades to reset the transaction logs. |
| -Version | Displays the P4 Plan server version. |
| -OverridePort [Port] | Overrides the port used for the P4 Plan server during the current session. |
| -CreateConfig [Configuration file] | Creates an initial configuration from a text file. Example: -CreateConfig ServerName ServerAdminPassword ServerPort bCreateDatabase [DatabaseName DatabaseAdminPassword] |
| -ChangeLicense [License key] | Change the license for the specified license key. |
-CreateConfig key-value pairs
The file used for the -CreateConfig command can contain the following key-value pairs.
| Key-value pair | Description | Required or optional |
|---|---|---|
| ServerName "[ServerName]" | P4 Plan server name. | Optional |
| ServerPassword "[Password]" | Password for server administrator. | Required. |
| ServerPort "[Port]" | Port the server listens on. | Optional |
| ServiceName "[ServiceName]" | Unique name of the service. | Optional |
| DatabaseHostname "[Hostname]" | Database hostname. | Optional |
| DatabaseName "[Name]" | Database name. | Optional |
| DatabasePassword "[Password]" | Password for database administrator. | Required. |
To configure the server email functionality, the file should also contain the following key-value pairs.
| Key-value pair | Description |
|---|---|
| Email_OutgoingServer "[Hostname]" | Outgoing email server hostname |
| Email_FromName "[Name>" | Email address to use as the From address in email |
| EmailSubject "[Subject]" | Email subject |
| EmailToEmail "[Target address]" | Email sender name |
| Email_FromEmail "[Address]" | Email sender address |
| Email_Subject "[Subject]" | Email subject |
| Email_SendTo "[Addresses]" | Recipients. Separate multiple addresses with a comma, semicolon, or space. |
| Email_Authentication "[0/1]" | Authentication: 0 = Disable, 1 = Enable |
| Email_UserName "[Username]" | Email username |
| Email_Password "[Password]" | Email password |
| Email_SecurityProtocol "[0/1/2]" | Protocol: 0 = None, 1 = SSL, 2 = TLS |
| Email_EmailLog "[0/1]" | Log outgoing emails: 0 = Disable, 1 = Enable |
| Email_SendTestEmail "[0/1]" | Send test email when starting up: 0 = Disable, 1 = Enable |
| Email_OutgoingPort "[Port]" | Port number |