Choose your language

Choose your login

Contact us

Server commands (server-command tool)

Available to customers on:

The server-command tool provides access to dozens of server operations ranging from user management, system maintenance, account manipulation, and printer control. The server-command tool is ideal for controlling the PaperCut NG/MF Application Server via the command line or automating via scripts.

Some examples of how an Administrator might use the server-command tool:

  • Scheduling of online backups and data snapshots.

  • Scheduling user and/or group synchronization tasks.

  • Automating the addition of new users after the accounts are added to the network.

  • Performing account transactions such as adding funds/quota to user accounts.

  • Automating user account creation using custom scripts.

  • Disabling/Enabling printers.

  • Disabling/Enabling printing for users.

  • Controlling user restriction levels.

  • Managing shared accounts.

  • Disabling/Enabling SNMPV3 on printers and devices.

The server-command program is a command-line tool. It accepts the commands as arguments and outputs the results of the command on the console (standard-out). For security reasons only users with read access to the server.properties (normally only the Administrators group) have rights to execute the commands.

Typical use on a Windows system:

Add $10.00 to a user named ’testuser':

C:\> cd [app-path]\server\bin\win
C:\> server-command adjust-user-account-balance "testuser" 10.00 \ "Added $10.00 to your account"

Accessing server commands remotely

Server commands can also be called remotely using standard remote command tools.

On Windows

Use PsExec - a remote command program provided by the Sysinternals team at Microsoft. For example, (all on one line):

psexec.exe \\remoteserver \
"C:\Program Files\PaperCut NG/MF\server\bin\win\server-command.exe" \
disable-printer printsrv1 labprinter -1

On Linux/Novell/Mac

Use SSH - a secure remote command/shell program. You can run SSH non-interactively in scripts with the use of an authorized public key added under the papercut account’s ~/.ssh/authorized_keys list. For example, (all on one line):

ssh papercut@remoteserver \
"/home/papercut/server/bin/linux-x64/server-command \
disable-printer printsrv1 labprinter -1"

Available commands

A full list of commands is also available via server-command --help .

User commands

user-exists <username>

Test to see if a user exists.

<username> - the username to test.

get-user-account-balance <username> [<account>]

Get a user's current account balance.

    <username> - the user's username.

    [<account>] - Optional personal account name. Only used when multiple personal accounts are enabled. Leave blank to get total balance.

get-user-property <username> <property>

Gets a user property.

    <username> - the name of the user.

    <property> - the name of the property to get. Valid properties include:

balance - the user's current account balance.

primary-card-number - the user's primary card number.

secondary-card-number - the user's secondary card number.

default-shared-account - the user's default shared account name.

auto-shared-account - the user's automatically selected shared account.

department - the user's department.

disabled-net - whether or not the user's internet access is currently disabled.

disabled-print - whether or not the user's printing is currently disabled.

email - the user's email address.

full-name - the user's full name.

notes - notes for the user.

office - the user's office.

print-stats.job-count - the total print job count for the user.

print-stats.page-count - the total printed page count for the user.

net-stats.data-mb - the internet data used by the user (in MB).

net-stats.time-hours - the internet time used by the user (in hours).

restricted - whether or not the user is currently restricted.

account-selection.mode - the user's current account selection mode.

account-selection.can-charge-personal - whether or not the user can charge to their personal account.

account-selection.can-charge-shared-from-list - whether or not the user can charge to a shared account, selected from a list.

account-selection.can-charge-shared-by-pin - whether or not the user can charge to a shared account, selected by PIN.

other-emails - the user's other email addresse(s).

username-alias - the user's alias. Only used when username aliasing is enabled.

home - the user's home folder (a double-quoted UNC path).

unauthenticated - whether or not the user is an unauthenticated user.

dont-hold-jobs-in-release-station - whether the user's job will bypass release queues.

dont-apply-printer-filter-rules - whether the user's job will bypass printer filters.

printer-cost-adjustment-rate-percent - percentage rate to adjust the user's job cost by.

dont-archive - whether the user's jobs will be archived.

auto-release-jobs - whether the user's jobs will always release on device login or not.

overdraft-amount - the user's individual overdraft amount.          

last-user-activity - the date and time the user was last active.    

delegated-groups - the group names the given user can release print jobs for.                                  

delegated-users - the user names the given user can release print jobs for.

print-script-property - Get the property saved on the user during a print script.

set-user-property <username> <property> <value>

Sets a user property.

    <username> - the name of the user.

    <property> - the name of the property to set. Valid properties and values include:

balance - the user's current account balance (a decimal number).

primary-card-number - the user's card number (any text).

secondary-card-number - the user's secondary card number (any text).

card-pin - the user's card pin number (any text).

default-shared-account - the user's default shared account name.

department - the user's department (any text).

disabled-net - whether or not the user's internet access is currently disabled (TRUE or FALSE).

disabled-print - whether or not the user's printing is currently disabled (TRUE or FALSE).

email - the user's email (an email address, or any text).

full-name - the user's full name (any text).

notes - notes for the user (any text).

office - the user's office (any text).

password - the user's password (for internal users only) (any text).

restricted - whether or not the user is currently restricted (TRUE or FALSE).

other-emails - the user's other emails (a comma separated list). Use blank to clear all other emails.

username-alias - the user's alias. Only used when username aliasing is enabled.

home - the user's home folder (a double-quoted UNC path).

unauthenticated - whether or not the user is an unauthenticated user.

dont-hold-jobs-in-release-station - whether the user's job will bypass release queues (TRUE or FALSE).

dont-apply-printer-filter-rules - whether the user's job will bypass printer filters (TRUE or FALSE).

printer-cost-adjustment-rate-percent - percentage rate to adjust the user's job cost by (a decimal number).

dont-archive - whether the user's jobs will be archived (TRUE or FALSE).

auto-release-jobs - whether the user's jobs will always release on device login or not (TRUE or FALSE).

overdraft-amount - the user's individual overdraft amount (a decimal number). This value is only relevant if the user account is restricted and the users overdraft mode is set to 'individual'.

delegated-groups - the group names the given user can release print jobs for (a comma separated list).         

delegated-users - the user names the given user can release print jobs for (a comma separated list).                

print-script-property - Set a property that can be used during a print script.      

<value> - the value to set (see <property> for valid values).

adjust-user-account-balance <username> <adjustment> <comment> [<account>]

Adjust a user's account balance.

    <username> - the user's username.

    <adjustment> - the adjustment amount as a number. +ve or -ve.

    <comment> - a comment to be associated with the transaction.

    [<account>] - Optional personal account name. Only used when multiple personal accounts are enabled.

adjust-user-account-balance-if-available <username> <adjustment> \<comment> [<account>]

Adjust a user's account balance if there is enough credit available.

    <username> - the user's username.

    <adjustment> - the adjustment amount as a number. +ve or -ve.

    <comment> - a comment to be associated with the transaction.

    [<account>] - Optional personal account name. Only used when multiple personal accounts are enabled.

adjust-user-account-balance-if-available-leave-remaining <username> \ <adjustment> <leave-remaining> <comment> [<account>]

Adjust a user's account balance if there is enough credit available to leave the given amount available in the account.

    <username> - the user's username.

    <adjustment> - the adjustment amount as a number. +ve or -ve.

    <leave-remaining> - the amount to leave in the account.

    <comment> - a comment to be associated with the transaction.

    [<account>] - Optional personal account name. Only used when multiple personal accounts are enabled.

adjust-user-account-balance-by-group <group> <adjustment> <comment> \[<account>]

Adjust the account balance for all users in a group.  This process happens in the background.

    <group> - the group for which all users' accounts are to be adjusted.

    <adjustment> - the adjustment amount as a number. +ve or -ve.

    <comment> - a comment to be associated with the transaction.

    [<account>] - Optional personal account name. Only used when multiple personal accounts are enabled.

adjust-user-account-balance-by-group-up-to <group> <adjustment> <limit><comment> [<account>]

Adjust the account balance for all users in a group, but don't increase user balance beyond the given limit.  This process happens in the background.

    <group> - the group for which all users' accounts are to be adjusted.

    <adjustment> - the adjustment amount as a number. Must be +ve

    <limit> - don't increase user balance beyond this limit.

    <comment> - a comment to be associated with the transaction.

    [<account>] - Optional personal account name. Only used when multiple personal accounts are enabled.

set-user-account-balance <username> <balance> <comment> [<account>]

Set a user's account balance to a set value.

    <username> - the user's username.

    <balance> - set the account to this value. +ve or -ve.

    <comment> - a comment to be associated with the transaction.

    [<account>] - Optional personal account name. Only used when multiple personal accounts are enabled.

set-user-account-balance-by-group <group> <balance> <comment> [<account>]

Set the balance for each member of a group to the given value.  This process happens in the background.

    <group> - the group for which all users' balance is to be set.

    <balance> - the value to set all users' balance to. +ve or -ve.

    <comment> - a comment to be associated with the transaction.

    [<account>] - Optional personal account name. Only used when multiple personal accounts are enabled.

reset-user-counts <username> <reset_by>

Reset the page and job counts associated with a user.

    <username> - the user's username.

    <reset_by> - name of the user/script/process resetting the counts.

re-apply-initial-user-settings <username>

Re-applies initial settings on the user. Initial user settings are based on group membership.

    <username> - the user's username.

disable-printing-for-user <username> <minutes_disabled>

Disable printing for a user for a set period of time.

    <username> - the name of the user to disable printing for.

    <minutes_disabled> - the time in minutes to disable. -1 indicates forever.

add-new-user <username>

Trigger the process of adding a new user account.

Assuming the user exists in the OS/Network/Domain user directory, the account will be created with the correct initial settings as defined by the rules set up in the admin interface under the Groups section.

    <username> - the user's system username.

rename-user <current_username> <new_username>

Rename the given existing user.

Use this method with care. Renaming a user should be performed in conjunction with renaming the user in the OS/Network/Domain.

    <current_username> - the name of the user to rename.

    <new_username> - the user's new name.

export-user-data-history <username> <savelocation>

Export user data from the following reports into five CSV files:

  • User list
  • User printing - logs
  • Shared account security access
  • User environmental impact - summary
  • Transaction logs

  <username> - the user's system username.

  <savelocation> - the storage location for the five CSV files. Please note the csv files will be owned by the system account running the PaperCut Application Server service, and so that account must also have write permissions for the <savelocation> directory.

delete-existing-user <username> [<flags>]

Delete a user account from the system. 

Use this method with care. Calling this will permanently delete the user account from the user list (print history records remain).

    <username> - the user's system username.

    [<flags>] - Available flags include:

      permanently-redact-user-data - permanently redact user data stored in PaperCut. This is not a placeholder and must be used with care. This is a one-way operation that cannot be undone.

      The Application Log displays the redact event associated with the user

      Data identifying the user is redacted in the following sections:

  • User Details
  • Job Logs
  • Reports

      Data identifying the user is not shown in the following sections:

  • Audit Log
  • Environmental dashboard

The following user-identifying data elements are unaffected:

  • Email addresses in other sections of PaperCut excluding User Details.
  • Archived print jobs in Job Log of the redacted user.
  • Previous events associated with the redacted user in Application Log.
add-new-internal-user <username> <password> <full_name> <email> <card-id> <pin> [<send email>]

Create a new internal user. 

Username and password are required. Other properties may be omitted. Properties may be changed after creation using 'set-user-property'. 

For more information about internal users see the user manual chapter 'Internal Users'.

    <username> - (required) the username of the new internal user.

    <password> - (required) user's password.

    <full_name> - (optional) user's full name.

    <email> - (optional) user's email address.

    <card-id> - the user's card or identity number.

    <pin> - the user's card/id PIN.

    [<send email>] - Whether we want to email the user with their created details. (Optional)

look-up-user-name-by-id-no <id-no>

Looks up the user with the given user id number and prints out their user name. 

If no match was found an empty line is printed out.

    <id-no> - The user id number to look up.

look-up-user-name-by-card-no <card-no>

Looks up the user with the given user card number and prints out their user name. 

If no match was found an empty line is printed out.

    <card-no> - The user card number to look up.

look-up-user-name-by-email <email>

Looks up the user with the given email address and prints out their user name. 

If no match was found an empty line is printed out.

    <email> - The user email address to look up.

look-up-user-name-by-secondary-user-name <username>

Looks up the user with the given secondary user name and prints out their user name.

If no match was found an empty line is printed out.

    <user name> - The secondary user name to look up.

look-up-user-name-by-full-name <full name>

Looks up the users with the given full name and prints out their user names.

If no match was found an empty line is printed out.

    <full name> - The full name of the user to look up.

add-user-to-group <username> <group>

Add a user to the specified group.

It changes the group membership within the application not in the OS/Network/Domain user directory.

    <username> - the name of the user.

    <group> - the name of the group to which the user needs to be added.

remove-user-from-group <username> <group>

Remove a user from the specified group.

It changes the group membership within the application not in the OS/Network/Domain user directory.

    <username> - the name of the user.

    <group> - the name of the group from which the user needs to be removed.

add-admin-access-user <username>

Add a user as an admin with default admin rights.

    <username> - the name of the user.

remove-admin-access-user <username>

Remove an admin user from the list of admins.

    <username> - the name of the user.

add-admin-access-group <groupname>

Add a group as an admin group with default admin rights.

    <groupname> - the name of the group.

remove-admin-access-group <groupname>

Remove a group from the list of admin groups.

    <groupname> - the name of the group.

set-user-account-selection-auto-select-shared-account <username> <account_name> <charge_personal>

Sets a user's account selection to charge to a single shared account.

    <username> - the name of the user.

    <account_name> - Full name of the shared account to charge to.

    <charge_personal> - whether or not personal account should be charged. (TRUE or FALSE)

set-user-account-selection-auto-charge-personal <username> [<withPopup>]

Sets a user's account selection to automatically charge to their personal account.

    <username> - the name of the user.

   [<withPopup>] - (optional) whether or not a confirmation popup is displayed. (TRUE or FALSE). Default FALSE.

set-user-account-selection-standard-popup <username> <allow_personal> <allow_list_selection> <allow_pin_code> <allow_printing_as_another_user> <charge_to_personal> [<default_shared_account>]

Sets a user's account selection to standard account selection popup.

    <username> - the name of the user.

    <allow_personal> - allow user to charge to personal account. (TRUE  or FALSE

    <allow_list_selection> - allow user to select a shared account from list. (TRUE  or FALSE)

    <allow_pin_code> - allow user to select a shared account using pin. (TRUE  or FALSE)                                     

    <allow_printing_as_another_user> - allow user to print as another user. (TRUE  or FALSE)                    

    <charge_to_personal> - when shared account is selected charge to personal account. (TRUE or FALSE)

    [<default_shared_account>] - Optional. The default shared account.

set-user-account-selection-advanced-popup <username> <allow_personal> <charge_to_personal> <default_shared_account>]

Sets a user's account selection to standard account selection popup.

    <username> - the name of the user.

    <allow_personal> - allow user to charge to personal account. (TRUE or FALSE)

FALSE sets "Charge shared account"(Default)

TRUE sets "Charge personal account (and allocate to shared account for reporting)"

    <charge_to_personal> - when shared account is selected charge to personal account. (TRUE or FALSE)

    [<default_shared_account>] - Optional. The default shared account.

clear-user-advanced-printer-settings <username>

Clear a user's override printer/device settings.

    <username> - the user's username

list-user-accounts

List the names of all the user accounts in the system, sorted by username, one per line.

list-deleted-users <before-date> <after-date>

List the ID's and names of all the deleted user accounts in the system.

    <before-date> - Users deleted before this date (0 if you want to ignore this parameter)

    <after-date> - Users deleted after this date (0 if you want to ignore this parameter)

    Date format required: yyyy-MM-ddTHH:mm (E.g 2019-10-05T00:00)

get-total-users

Gets a count of all the users in the system.

use-card <user_name> <card_number>

Redeem a card and place the credit on the user's account.

    <user_name> - the name of the user with the account to credit.

    <card_number> - the number of the card to use.

get-user-overdraft-mode <username>

Gets the overdraft mode for the user ('default' or 'individual').

set-user-overdraft-mode <username> <overdraft-mode>

Sets the overdraft mode for the user where <overdraft-mode> is:

      individual - to use individual overdraft

      default - to use default overdraft

Printer and device commands

apply-device-settings <device name>

Initiates an update to the device of any outstanding configuration changes  applied via the set-printer-property command.

    <device name> - the device name

get-printer-property <server_name> <printer_name> <property>

Gets a printer property.

    <server_name> - the name of the server the printer is hosted on.

    <printer_name> - the name of the printer.

    <property> - the name of the property to get. Valid properties include:

cost-model - the cost model used by the printer (e.g. SIMPLE)

custom-field-1 - the value for custom field 1 if set.

custom-field-2 - the value for custom field 2 if set.

custom-field-3 - the value for custom field 3 if set.

custom-field-4 - the value for custom field 4 if set.

custom-field-5 - the value for custom field 5 if set.

custom-field-6 - the value for custom field 6 if set.

disabled - whether or not the printer is currently disabled.

print-stats.job-count - the total print job count for this printer.

print-stats.page-count - the total printed page count for this printer.

printer-id - the printer's unique identifier.

virtual - If the printer is a virtual queue.

device-functions - The the functions of the device. E.g COPIER.

release-station - Returns the held job mode. I.e User held(STANDARD).

set-printer-property <server_name> <printer_name> <property> <value>

Sets a printer property.

    <server_name> - the name of the server the printer is hosted on.

    <printer_name> - the name of the printer.

    <property> - the name of the property to set. Valid properties and values include:

disabled - whether or not the printer is currently disabled. (TRUE or FALSE)

cost-model - the cost model used by the printer: SIMPLE, AREA, SIZE_TABLE, SIZE_CATEGORY, SIZE_DETAILED, SIZE_LENGTH,

custom-field-1 - the value for custom field 1

custom-field-2 - the value for custom field 2

custom-field-3 - the value for custom field 3

custom-field-4 - the value for custom field 4

custom-field-5 - the value for custom field 5

custom-field-6 - the value for custom field 6

override-user-level-settings - whether or not printer should override user level settings. (TRUE or FALSE)

override-user-level-settings-charge-to - the name of the shared account. Use "[personal]" for personal account. Use blank to disable charge to settings.

virtual - If the printer is virtual (TRUE or False)

release-station - If the printer should hold release jobs. Valid values: STANDARD(User held jobs), MANAGER_ONLY, DISABLED

device-functions - The the functions of the device. E.g COPIER. Valid Values: RELEASE,COPIER,FAX,SCANNER

<value> - the value to set (see <property> for valid values).

list-printers [<device type>]

List the names of all the printers in the system, sorted by printer name, one per line.

    <device type>(Optional) - Specify what kind of printer you want the list to return. I.e printers, devices or all. If no device type is specified, a list of printers and devices is returned.

set-printer-cost-simple <server_name> <printer_name> <cost_per_page>

Sets the printer's page cost (using SIMPLE charging model).

    <server_name> - the name of the server the printer is hosted on.

    <printer_name> - the name of the printer.

    <cost_per_page> - the cost per page (simple charging model)

get-printer-cost-simple <server_name> <printer_name>

Get the printer's page cost (using SIMPLE charging model).

    <server_name> - the name of the server the printer is hosted on.

    <printer_name> - the name of the printer.

reset-printer-counts <server_name> <printer_name> <reset_by>

Reset the page and job counts associated with a printer.

    <server_name> - the name of the server hosting the printer.

    <printer_name> - the printer's name.

    <reset_by> - name of the user/script/process resetting the counts.

add-printer-group <server_name> <printer_name> <printer_group_name>

Add a printer to a single printer group in addition to existing printer group membership.

    <server_name> - the name of the server hosting the printer.

    <printer_name> - the printer's name.

    <printer_group_name> -  name of a printer group.

set-printer-groups <server_name> <printer_name> <printer_group_names>

Set the printer groups a printer belongs to, overwriting any existing group membership.

    <server_name> - the name of the server hosting the printer.

    <printer_name> - the printer's name.

    <printer_group_names> - a comma separated list of printer group names. To clear all group association set to " ".

enable-printer <server_name> <printer_name>

Enable a printer.

    <server_name> - the name of the server hosting the printer.

    <printer_name> - the printer's name.

disable-printer <server_name> <printer_name> <minutes_disabled>

Disable a printer for a set period of time.

    <server_name> - the name of the server hosting the printer.

    <printer_name> - the printer's name.

    <minutes_disabled> - the time in minutes to disable. -1 indicates forever.

delete-printer <server_name> <printer_name>

Delete a printer.

    <server_name> - the name of the server hosting the printer.

    <printer_name> - the printer's name. Use "[All Printers]" to delete all printers on the specified server.

rename-printer <server_name> <printer_name> <new_server_name> <new_printer_name>

Rename a printer.

This can be useful after migrating a print queue or print server (i.e. the printer retains its history and settings under the new name). Note that in some cases case sensitivity is important, so care should be taken to enter the name exactly as it appears in the OS.

    <server_name> - the existing printer's server name

    <printer_name> - the existing printer's queue name

    <new_server_name> - the new printer's server name

    <new_printer_name> - the new printer's queue name

add-printer-access-group <server_name> <printer_name> <group_name>

Adds the user group to the printer's access group list.

    <server_name> - the printer's server name.

    <printer_name> - the printer's queue name.

    <group_name> - the name of the user group that needs to be added.

remove-printer-access-group <server_name> <printer_name> <group_name>

Removes the user group from the printer's access group list.

    <server_name> - the printer's server name.

    <printer_name> - the printer's queue name.

    <group_name> - the name of the user group that needs to be removed.

enable-printer-snmpv3 <server_name> <printer_name> <context_name> <user_name> <auth_password> <privacy_password> <auth_protocol> <privacy_protocol>

Enables SNMP V3 for the printer for printer status and Toner information.

    <server_name> - the printer's server name

    <printer_name> - the printer's queue name. Use "[All Printers]" to enable all printers on the specified server. NB: This makes sense if all printers are from the same vendor.

    <context_name> - the SNMP v3 context name.

    <user_name> - the SNMP v3 authentication user name.

    <auth_password> - the SNMP v3 authentication password.

    <auth_protocol> - the SNMP v3 authentication protocol.

    <privacy_protocol> - the SNMP v3 privacy/encryption protocol.

disable-printer-snmpv3 <server_name> <printer_name>

Disables SNMP V3 for the printer for printer status and Toner information. Any SNMP requests will revert to SNMP V1 or V2 as appropriate.

    <server_name> - the printer's server name.

    <printer_name> - the printer's queue name. Use "[All Printers]" to disable SNMP V3 on all printers on the specified server.

get-printer-snmpv3 <server_name> <printer_name>

Get SNMP V3 printer configuration settings.

    <server_name> - the printer's server name

    <printer_name> - the printer's queue name. Use "[All Printers]" to get SNMP V3 info on all printers on the specified server.

enable-device-snmpv3 <device_name> <context_name> <user_name> <auth_password> <privacy_password> <auth_protocol> <privacy_protocol>

Enables SNMP V3 for the device for blocking errors or configuration.

    <device_name> - the device name. Use "[All Devices]" to enable SNMP V3 on all devices. NB: This makes sense if all devices are from the same vendor.

    <context_name> - the SNMP v3 context name

    <user_name> - the SNMP v3 authentication user name

    <auth_password> - the SNMP v3 authentication password

    <auth_protocol> - the SNMP v3 authentication protocol

    <privacy_protocol> - the SNMP v3 privacy/encryption protocol.

disable-device-snmpv3 <device_name>

Disables SNMP V3 for the device for blocking errors or configuration. Any SNMP requests will revert to SNMP V1 or V2 as appropriate.

    <device_name> - the device name. Use "[All Devices]" to disable SNMP V3 on all devices.

get-device-snmpv3 <device_name>

Get SNMP V3 device configuration settings.

    <device_name> - the device name. Use "[All Devices]" to get SNMP V3 info on all devices.

deploy-staged-device <device_name>

Deploys an existing staged device.

    <device_name> - the name of the device.

is-device-staged <device_name>

Check whether or not a device is staged.

    <device_name> - the name of the device.

get-device-status <device_name>

Get a text that represents the current status of a device.

The text will contain the current device running status and any errors if applicable.

    <device_name> - the name of the device.

Shared account commands

list-shared-accounts

List the names of all the shared accounts in the system, sorted by shared account name, one per line.

list-user-shared-accounts <username> [<ignoreAccountMode>]

List the names of all the shared accounts accessible by the given user sorted by account name, one per line.

    <username> - User for which to list accounts.

    [<ignoreAccountMode>] - Optional. Specify TRUE to ignore user's account selection mode. (TRUE or FALSE)

shared-account-exists <account_name>

Test to see if a shared account exists.

    <account_name> - the shared account name to test.

get-shared-account-account-balance <account_name>

Get shared account's current account balance.

    <account_name> - the shared account's full name.

get-shared-account-property <account_name> <property>

Gets a shared account property.

    <account_name> - the name of the shared account.

    <property> - the name of the property to get. Valid properties include:

access-groups - the shared account's access groups (a comma separated list). Use blank to clear all groups.

access-users - the shared account's access users (a comma separated list). Use blank to clear all users.

account-id - the shared account's unique identifier.

balance - the shared account's current balance.

comment-option - the shared account's commenting option.

disabled - whether or not the shared account is currently disabled.

invoice-option - the shared account's invoicing option.

notes - notes for the shared account.

overdraft-amount - the shared account's individual overdraft balance.

pin - the shared account's PIN.

restricted - whether or not the shared account is currently restricted.

set-shared-account-property <account_name> <property> <value>

Sets a shared account property.

    <account_name> - the name of the shared account.

    <property> - the name of the property to set. Valid properties and values include:

access-groups - the shared account's access groups (a comma separated list).

access-users - the shared account's access users (a comma separated list).

balance - the shared account's current balance (a decimal number).

comment-option - the shared account's commenting option. One of:

    NO_COMMENT - no comment may be entered.

    COMMENT_REQUIRED - a comment must be entered

    COMMENT_OPTIONAL - the user may enter a comment or not.

disabled - whether or not the shared account is currently disabled (TRUE or FALSE).

invoice-option - the shared account's invoicing option. One of:

    ALWAYS_INVOICE - print jobs will always be invoiced.

    NEVER_INVOICE - print jobs will never be invoiced.

    USER_CHOICE_ON - the user can choose (default on/yes).

    USER_CHOICE_OFF - the user can choose (default off/no).

notes - notes for the shared account (any text).

pin - the shared account's PIN (any text, must be unique).

restricted - whether or not the shared account is currently restricted (TRUE or FALSE).

overdraft-amount - the shared accounts's individual overdraft amount (a decimal number). This value is only relevant if the shared account is restricted and the shared account's overdraft mode is set to 'individual'.

<value> - the value to set (see <property> for valid values).

NOTE: Any value other than true is treated as false, when passing in boolean values.

adjust-shared-account-account-balance <account_name> <adjustment> <comment>

Adjust a shared account's account balance.

    <account_name> - the shared account's full name.

    <adjustment> - the adjustment amount as a number. +ve or -ve.

    <comment> - a comment to be associated with the transaction.

set-shared-account-account-balance <account_name> <balance> <comment>

Set a shared account's balance to a specific value.

    <account_name> - the shared account's full name.

    <balance> - set the account to this value. +ve or -ve.

    <comment> - a comment to be associated with the transaction.

add-new-shared-account <shared_account_name>

Add a new shared account.

    <shared_account_name> - the name of the shared account.

rename-shared-account <curr_shared_account_name> <new_shared_account_name>

Rename an existing shared account.

    <curr_shared_account_name> - Current shared account name. Use a '\' to denote a subaccount e.g.: 'parent\sub'

    <new_shared_account_name> - New shared account name.

delete-existing-shared-account <shared_account_name>

Delete a shared account from the system.  Use this method with care.

Calling this will permanently delete it from the shared account list (print history records will remain).

    <shared_account_name> - the name of the shared account to delete.

add-shared-account-access-user <shared_account_name> <username>

Allow the given user access to the given shared account without using a pin.

    <shared_account_name> - the name of the shared account to allow access to.

    <username> - the name of the user to give access to.

add-shared-account-access-group <shared_account_name> <group_name>

Allow the given group access to the given shared account without using a pin.

    <shared_account_name> - the name of the shared account to allow access to.

    <group_name> - the name of the group to give access to.

remove-shared-account-access-user <shared_account_name> <username>

Revoke the given users access to the given shared account.

    <shared_account_name> - the name of the shared account to revoke access to.

    <username> - the name of the user to revoke access for.

remove-shared-account-access-group <shared_account_name> <group_name>

Revoke the given group's access to the given shared account.

    <shared_account_name> - the name of the shared account to revoke access to.

    <group_name> - the name of the group to revoke access for.

get-shared-account-overdraft-mode <account_name>

Gets the overdraft mode for the shared account.

<account_name> - the name of the shared account to get the overdraft mode for. ('default' or 'individual').

set-shared-account-overdraft-mode <account_name> <overdraft-mode>

Sets the overdraft mode for the shared account.

<account_name> - the name of the shared account to set the overdraft mode for.

<overdraft-mode> - use either:

      individual - to use individual overdraft

      default - to use default overdraft

Report commands

generate-scheduled-report <report title> <save location>

Generates a scheduled report.

    <report title> - the title of the PaperCut scheduled report.

    <save location> - the directory on the server in which to save the report.

Group commands

add-new-group <group_name>

Add a new group to the system's group list.

If PaperCut is connected to a directory server then the group should already exist in the network directory.

    <group_name> - The name of the group to add.

sync-group <group_name>

Syncs an existing group with the configured directory server, updating the group membership.

    <group_name> - The name of the group to sync.

remove-group <group_name>

Removes a group.

    <group_name> - The name of the group to remove.

get-group-members <group_name>

Retrieves user name of all users in a group.

    <group_name> - The name of the group to query.

get-user-groups <user_name>

Retrieves all groups a single user belongs to.

    <user_name> - The name of the user to query.

list-user-groups

List the names of all the user groups in the system, sorted by group name, one per line.        

group-exists <group_name>

Test to see if a group exists.

    <group_name> - the group name to test.

set-group-quota <group_name> <quota_amount> <period> <quota_max_accum>

Set a Group’s quota to a specific value.

    <group_name> - the name of the group to set.

    <quota_amount> - the quota amount.

    <period> - the schedule period (i.e. DAILY, WEEKLY, MONTHLY).

    <quota_max_accum> - the quota maximum accumulation amount. Set to 0.0 to have no limit.

get-group-quota <group_name>

Get the group quota allocation settings on a given group.

Returns the quota amount, the schedule period and the quota maximum accumulation amount.

    <group_name> - the name of the group to get.

Admin task commands

perform-online-backup

Start an online backup. 

The backup file is written to: ~/server/data/backups, as a dated, zipped XML file.

This process happens in the background.

perform-group-sync

Start the process of synchronizing the system's group membership with the OS/Network/Domain's group membership.

A call to this method will commence the sync process and the operation will complete in the background.

perform-user-and-group-sync

Start a full user and group synchronization.

This is equivalent to pressing the "Synchronize Now" button in the admin interface. No existing users will be removed.

Whether or not full details for existing users will be updated depends on the current user/group sync settings as defined in the admin interface.

A call to this method will commence the sync process and the operation will complete in the background.

perform-user-and-group-sync-advanced <delete_old_users> <update_details>

An advanced version of the user and group synchronization process providing control over the sync settings.

A call to this method will commence the sync process and the operation will complete in the background.

    <delete_old_users> - set to TRUE remove old users, else FALSE.

    <update_details> - set to TRUE if existing users details (e.g. email, full-name, etc. ) are to be updated.

add-new-users

Calling this method will start a specialized user and group synchronization process optimized for tracking down adding any new users that exist in the OS/Network/Domain user directory and not in the system.

Any existing user accounts will not be modified.

A group synchronization will only be performed if new users are actually added to the system.

is-task-complete

Returns TRUE if a long running task such as perform-group-sync, perform-user-and-group-sync, or add-new-users has completed.

get-task-status

Returns status information such as progress, completion status and, error messages, on the current or last run long running task such as perform-group-sync, perform-user-and-group-sync, or add-new-users.

batch-import-shared-accounts <import_file> <test><delete_non_existent_accounts>

Import the shared accounts contained in the given tab-delimited import file.

    <import_file> - the import file location.

    <test> - (TRUE or FALSE) If TRUE, perform a test only. The printed statistics will show what would have occurred if testing wasn't enabled. No accounts will be modified.

    <delete_non_existent_accounts> - (TRUE or FALSE) If TRUE, accounts that do not exist in the import file but exist in the system will be deleted.  If FALSE, they will be ignored.

batch-import-users <import_file> <create_new_users> <email_user_on_creation>

Import the users contained in the given tab-delimited import file. 

See the user manual chapter 'Batch User Data Import and Update' for a description of the file format.

    <import_file> - the import file location.

    <create_new_users> - If TRUE, users only existing in the import file will be newly created, otherwise ignored.

    <email_user_on_creation> - If TRUE, users will be emailed as they are created by the import.

batch-import-internal-users <import_file><overwrite_existing_passwords><overwrite_existing_pins> <email_user_on_creation>

Import the internal users contained in the given tab-delimited import file.

See the user manual chapter section 'Batch Internal User Import File Format' for a description of the file format.

    <import_file> - the import file location.

    <overwrite_existing_passwords> -   (optional, default TRUE) - (TRUE or FALSE) If TRUE, passwords from the import file will overwrite existing passwords where a user already has a has a password set. If FALSE, existing passwords will not be changed.

    <overwrite_existing_pins> - (optional, default TRUE) - (TRUE or FALSE) If TRUE, PINs from the import file will overwrite existing PINs where a user already has a has a PIN set.  If FALSE, existing PINs will not be changed.

    <email_user_on_creation> - If TRUE, users will be emailed as they are created by the import.

batch-import-user-card-id-numbers <import_file> <overwrite_existing_pins>

Import the user card/ID numbers and PINs contained in the given tab-delimited import file.

See the user manual chapter 'Advanced User Management' for a description of the file format).

    <import_file> - the import file location.

    <overwrite_existing_pins> - (optional, default TRUE) - (TRUE or FALSE) If TRUE, PINs from the import file will overwrite existing PINs where a user already has a has a PIN set.  If FALSE, existing PINs will not be changed.

batch-import-printers <import_file>

Updates printers based on the details contained in the given tab-delimited import file, creating them if required.

See the user manual chapter 'Advanced Printer Management' for a description of the file format).

    <import_file> - the import file location.

batch-create-devices <import_file> [<throughput>]

Creates the devices contained in the given csv import file.

    <import_file> - the import file location.

    <throughput> (optional, default 25) - the number of devices to create in parallel.

create-user-client-accounts-file

Saves a file containing shared accounts data for the user client.

See the manual for more information on how this feature can be used.

The file will be saved on the server to the location:

[app-path]\server\data\client\client-accounts.dat

If this file already exists it will be over-written.

get-config <config-name>

Gets the value of the given config value printing the result.

If the config value does not exist, a blank string is displayed.

    <config-name> - the name of the config value to get.

set-config <config-name> <config-value>

Sets the value of the given config item.

NOTE: Take care updating config values. You may cause serious problems which can only be fixed by reinstallation of the application. Use the set-config command at your own risk.

    <config-name> - the name of the config value to set.

    <config-value> - the value to set.

process-job <job-details>

Takes the details of a job and logs and charges as if it were a "real" job.  Jobs processed via this method are not susceptible to filters, pop-ups, hold/release queues etc., they are simply logged. 

See the user manual section "Importing Job Details" for more information and the format of <job-details>.

    <job-details> - the details of the job to log.

generate-printer-qr-codes <https_on> <server> <port> <dir>

Generates a QR code for each printer and saves them in <dir>.

    These QR codes can be used from the Mobile Print Release app to release a job without the need to log in to a device.

    <https_on> - Indicates whether encoded URLs should use HTTP or HTTPS (either TRUE or FALSE).

    <server> - public IP address or hostname of the PaperCut MF/NG Application Server.

    <port> - Port number used by PaperCut MF/NG application server, usually 9191 (HTTP) or 9192/9195 (HTTPS).

    <dir> - The absolute or relative path from the NG/MF install directory, to the folder in which the generated QR codes are.

install-license <license_file>

Installs a new license file.

    <license_file> - The new license file location.

Comments