# MSP Management Commands

## Commands

#### Keeper Command Reference

Whether using the interactive shell, CLI or JSON config file, Keeper supports the following commands, each command supports additional parameters and options.

To get help on a particular command, run:

`help <command>`

**MSP Commands**

| Command                                                                                                              | Explanation                                                          |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [`msp-info`](#msp-info-command) or [`mi`](#msp-info-command)                                                         | Display MSP details                                                  |
| [`msp-down`](#msp-down-command) or [`md`](#msp-down-command)                                                         | Refresh local MSP data from server                                   |
| [`msp-add`](#msp-add) or [`ma`](#msp-add)                                                                            | Creates Managed Company                                              |
| [`msp-remove`](#msp-remove) or [`mrm`](#msp-remove)                                                                  | Removes Managed Company                                              |
| [`msp-update`](#msp-update) or [`mu`](#msp-update)                                                                   | Modify Managed Company licenses                                      |
| [`msp-billing-report`](#msp-billing-report)                                                                          | Generate MSP Billing Reports                                         |
| [`msp-legacy-report`](/en/keeperpam/commander-cli/command-reference/reporting-commands.md#msp-legacy-report-command) | Generate MSP Legacy Report                                           |
| [`switch-to-mc`](#switch-to-mc-command)                                                                              | Switch context to run commands as a managed company                  |
| [`switch-to-msp`](#switch-to-msp-command)                                                                            | Switch context to run commands as MSP                                |
| [`msp-convert-node`](#msp-convert-node-command)                                                                      | Convert an enterprise node into a managed company                    |
| [`msp-copy-role`](#msp-copy-role-command)                                                                            | Copy role enforcements from MSP to MCs                               |
| [`distributor`](#distributor-commands)                                                                               | Options for managed MSPs. Edit licenses and view msp and mc details. |

{% hint style="info" %}
MSP Commands require a [MSP type Keeper Account](/en/enterprise-guide/keeper-msp.md) and MSP Admin privileges
{% endhint %}

### **msp-info command**

**Command:** `msp-info` or `mi`

**Detail:** Display MSP details such as licenses and managed companies

**Examples:**

```
msp-info
```

1. Show MSP Information

**Example Output:**

```
  MSP Plans and Licenses
-----------------------
  #  Plan Id           Available Licenses    Total Licenses    Stash
---  --------------  --------------------  ----------------  -------
  1  business                           6                10       10
  2  businessPlus                       8                10       10
  3  enterprise                         2                10       10
  4  enterprisePlus                     6                10       10

  #    ID  Name         Plan              Allocated    Active
---  ----  -----------  --------------  -----------  --------
  1  3861  Company 1     businessPlus              2         2
  2  3862  Company 2     enterprise                0         0
  3  3900  Company 3     business                  2         0
  4  3877  Company 4     enterprisePlus            4         0
  5  3863  Company 5     enterprise                8         0
  6  3875  Company 6     business                  2         0

```

### msp-down command

**Command:** `msp-down` or `md`

**Detail:** Refresh local MSP data from server

**Examples:**

```
msp-down
```

1. Download current MSP data from the Keeper Cloud

### msp-add

**Command**: `msp-add`

**Details**: Creates Managed Company

**Switches**:

`--plan` or `-p` <{business, businessPlus, enterprise, enterprisePlus}> MC plan or product

`--seats` or `-s` \<NUMBER OF SEATS> number of seats to add

**Parameters**:

Managed Company name.

**Example**:

```
msp-add --seats=10 --plan=enterprise "MC Name"
```

{% hint style="info" %}
When a new managed company is created, Commander saves the new mc id as an environment variable `last_mc_id`\
`See the` [`documentation below`](#undefined) `about using this variable`
{% endhint %}

### msp-remove

**Command**: `msp-remove`

**Details**: Removes Managed Company

**Parameters**:

Managed Company name or ID

**Example**:

```
msp-remove 23456
msp-remove "MC Name"
```

### msp-update

**Command**: `msp-update` or `mu`

**Details**: Modify/Update Managed Company license

**Switches:**

`--node` \<NODE> Node name of Node ID

`--plan` or `-p` <{business, businessPlus, enterprise, enterprisePlus}> MC plan or product

\--seats or -s \<NUMBER OF SEATS> number of seats to add

`--file-plan` or `-f` \<FILE\_PLAN> File storage plan: 100gb, 1tb, 10tb

File Plan Options:

* 100gb
* 1tb
* 10tb

`--add-addon` or `-aa` \[ADDON NAME] allow the MSP to use the addon

`--remove-addon` or `-ra` \[ADDON NAME] remove the addon from the msp

Addon options:

* compliance\_report
* enterprise\_audit\_and\_reporting
* secrets\_manager
* enterprise\_breach\_watch
* onboarding\_and\_certificate
* msp\_service\_and\_support
* connection\_manager
* chat
* password\_rotation
* remote\_browser\_isolation
* privileged\_access\_manager
* keeper\_endpoint\_privilege\_manager

**Parameters:**

Managed Company name or ID

**Example:**

```
msp-update mc2 --add-product business
msp-update --node 23613730193410 mc2
```

### msp-billing-report

**Command**: `msp-billing-report`

**Details**: Generate MSP Billing Reports

**Switches:**

`--month YYYY-MM.` Month for billing report: 2022-02

`-d` or `--show-date.` Breakdown report by date

`-c` or `--show-company.` Breakdown report by managed company

`--format {json, csv, table}` format to return the list as

`--output [filename]` if supplied, the output is saved to the given file

### switch-to-mc command

**Command:** `switch-to-mc`

**Detail:** Change context to the given managed company, all commands will be run for that company

**Parameters:**

Managed company ID

note: see a list of managed company IDs with the `msp-info` command

**Examples:**

```
switch-to-mc 3987 
```

1. Change context to managed company with ID 3987

### switch-to-msp command

**Command:** `switch-to-msp`

**Detail:** Change context back to MSP if previously switched to managed company context

**Examples:**

```
switch-to-msp
```

1. Change context to MSP

### msp-convert-node command

**Command:** `msp-convert-node`

**Detail:** Convert an enterprise node into a managed company

{% hint style="danger" %}
Remove SSO provisioning before converting an enterprise node into a managed company
{% endhint %}

**Examples:**

```
msp-convert-node <NODE ID or NAME>
```

1. convert the given node into a managed company

### msp-copy-role command

**Command**: `msp-copy-role`

**Detail**: Copy role enforcements from MSP to MCs

`msp-copy-role <MC NAME> --role <ROLE NAME>`

**Parameters:** MC name (Required) the name of the MC to copy a role to

**Switches:**

`--role` \<ROLE NAME> the role to copy

**Examples**:

<pre><code><strong>msp-copy-role SmithCoMC --role="Desktop Users" 
</strong></code></pre>

### distributor commands

The distributor command is available to distributor accounts which manage MSPs.

The distributor command allows you to: list manage MSPs and their MCs, manage and edit the licenses available to MSPs, and view the overall usage of all MSPs being managed.

Sub Commands:

`info` View all managed MSPs

`msp-info` View information and usage of a specified MSP

`license` View or edit the license options for a specified MSP

#### distributor info

**Command:** `distributor info`

**Detail:** Lists all managed MSPs

**Switches:**

`--reload` reload the list of MSPs

`--format` {json, csv, table} format to return the list as

`--output` \[filename] if supplied, the output is saved to the given file

`--mc-details` show the managed companies under each MSP

**Examples:**

```
distributor info
distributor info --mc-details --format csv --output msp-report.csv
```

1. List manage MSPs
2. Save a report of all managed MSPs and their managed companies to a file

#### distributor msp-info

**Command:** `distributor msp-info <MSP NAME>`

**Detail:** View information of a specified MSP

**Parameters:** MSP name or ID

**Switches:**

\--reload refresh MSP details

\--format {json, csv, table} format to return the information as

\--output \[filename] if supplied, the output is saved to the given file

Examples:

```
distributor msp-info "Bob's msp"
```

1. See information about MSP "Bob's MSP"

#### distributor license

**Command:** distributor license \[MSP NAME, ID, pattern, ...]

**Detail:** View or edit license availability for a MSP

**Parameter:** MSP name or ID

**Switches:**

`--add-product` \[PRODUCT NAME] add a product as an offering for the MSP

`--remove-product` \[PRODUCT NAME] remove a product as an offering of the MSP

Product options:

* business
* enterprise
* enterprise\_plus

`--add-addon` \[ADDON NAME] allow the MSP to use the addon

`--remove-addon` \[ADDON NAME] remove the addon from the msp

Addon options:

* compliance\_report
* enterprise\_audit\_and\_reporting
* secrets\_manager
* enterprise\_breach\_watch
* onboarding\_and\_certificate
* msp\_service\_and\_support
* connection\_manager
* chat
* password\_rotation
* remote\_browser\_isolation
* privileged\_access\_manager
* keeper\_endpoint\_privilege\_manager

`--max-file-plan` \[AMOUNT] set the maximum file plan the MSP can offer

`--allocate-unlimited` {true, false} if true, allow MSP to allocate unlimited licenses

**Examples:**

```
distributor license "Bob's MSP" --add-product business
distributor license "My MSP" 3456 --max-file-plan 1TB
distributor license --allocate-unlimited=off *
```

1. add the business product to the available offerings of "Bob's MSP"
2. Set the maximum file plan offering of "My MSP" and MSP #3456 to 1 Terabyte
3. Turn off the unlimited licenses for all managed MSPs


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/en/keeperpam/commander-cli/command-reference/msp-management-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
