> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/commander-sdk/keeper-commander-sdks/sdk-command-reference/msp-management-commands.md).

# MSP Management Commands

Commands specific to Managed Service Provider (MSP) tenants

### Overview <a href="#msp-management-commands-1" id="msp-management-commands-1"></a>

This subset of commands applies to **MSP (Managed Service Provider)** accounts. They allow you to manage managed companies (MCs), refresh MSP data, switch context between MSP and a managed company, and convert an enterprise node into a managed company.

**Commands**:

* [MSP List Command](#msp-list)
* [MSP Refresh Data Command](#msp-refresh-data)
* [MSP Create Command](#msp-create)
* [MSP Update Command](#msp-update)
* [MSP Delete Command](#msp-delete)
* [MSP Login Command (Switching to MC)](#msp-login-switch-to-mc)
* [MSP Copy Role](#msp-convert-node)
* [Switch to MSP Command](#msp-switch-to-msp)
* [MSP Convert Node Command](#msp-convert-node-1)
* [MSP Legacy Report](#msp-legacy-report)

### Managed Company List

Retrieves and displays a table of all managed companies for the MSP. Each row contains company name, ID, node, plan, storage, addons, seats allowed, seats used, and paused status. Available only when logged in with an MSP-licensed account.

<details>

<summary>DotNet CLI</summary>

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

**Flags:** None

**Example:**

```sh
My Vault> mc-list
  #  Company Name             Company ID  Node                 Plan             Storage       Addons                              Seats Allowed  Seats Used  Paused
---  -----------------------  ----------  -------------------  ---------------  ------------  ----------------------------------  -------------  ----------  ------
  1  21Jan                    311310      abc.                 Business         STORAGE_1TB                                                   0           0        
  2  ADD NO ADDON             310855      ace                  Enterprise       100GB                                                 Unlimited           1        
  3  ADD ON PREM              310858      abe.                 Business         100GB         Keeper Connection Manager (KCM)         Unlimited           0        
  4  ADD11                    310854      aid                  Business Plus    STORAGE_1TB   Advanced Reporting & Alerts Module      Unlimited           1        
                                                                                              BreachWatch                                                          
  5  ADD123                   310852      acme                 Business Plus    STORAGE_1TB   Advanced Reporting & Alerts Module      Unlimited           0        
                                                                                              BreachWatch                                                          
                                                                                              remote_browser_isolation                                             
  6  Adayaa Dev Inc           311536      abcde.               Business         STORAGE_10TB  keeper_endpoint_privilege_manager              10           0                                            
```

</details>

<details>

<summary>DotNet SDK</summary>

Managed company list can be obtained from the SDK when the enterprise loader includes `ManagedCompanyData` and the account has MSP license:

```csharp
// When context.Enterprise includes ManagedCompanyData (MSP account)
var managedCompanies = context.RoleManagement.Enterprise.GetPlugins()
    .OfType<ManagedCompanyData>()
    .FirstOrDefault();
if (managedCompanies != null)
{
    foreach (var mc in managedCompanies.ManagedCompanies)
    {
        Console.WriteLine($"{mc.EnterpriseName} (ID: {mc.EnterpriseId})");
    }
}
```

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Get-KeeperManagedCompany`

**Aliases:** `kmc`

**Flags:**

<table><thead><tr><th width="193.6494140625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Restriction</strong></td><td>Show MSP permits: unlimited licenses, allowed products, allowed add-ons, max file plan. Output is list-style for readability.</td></tr><tr><td><strong>Pricing</strong></td><td>Show BI subscription pricing (products, add-ons, file plans) with currency and unit.</td></tr><tr><td><strong>Filter</strong></td><td>Optional partial filter on MC name; ignored when using <code>-Restriction</code>, <code>-Pricing</code>, or <code>-ManagedCompany</code>.</td></tr><tr><td><strong>Detailed</strong></td><td>Full MC list: company_id, company_name, node, node_name, plan, storage, addons (with seats), allocated, active; sorted by name.</td></tr><tr><td><strong>ManagedCompany</strong></td><td>Filter to a <strong>single</strong> MC by exact name or ID. Use with <code>-Detailed</code> for one MC’s details.</td></tr><tr><td><strong>Format</strong></td><td><code>table</code> (default), <code>json</code>, or <code>csv</code>.</td></tr><tr><td><strong>Output</strong></td><td>If set, write results to this file path.</td></tr></tbody></table>

**Example:**

```powershell
PS> Get-KeeperManagedCompany 

EnterpriseId EnterpriseName                                     ProductId      NumberOfSeats NumberOfUsers FilePlanType  IsExpired     ParentNodeId NodeName            Addons
------------ --------------                                     ---------      ------------- ------------- ------------  ---------     ------------ --------            ------
      309488 test ppppppp etc                                   business          2147483647             0 STORAGE_100GB     False 1169425105420290 Maaaaaalll          keeper_endpoint_privilege_manager
      308504 new test updated                                   business          2147483647             0 STORAGE_100GB     False 1169425105420290 Meeeeeeoooo          

PS> Get-KeeperManagedCompany -ManagedCompany tests2

EnterpriseId EnterpriseName ProductId      NumberOfSeats NumberOfUsers FilePlanType IsExpired     ParentNodeId NodeName   Addons
------------ -------------- ---------      ------------- ------------- ------------ ---------     ------------ --------   ------
      315830 tests2         enterprisePlus            13             1 STORAGE_1TB      False 1169425105420290 Metronlabs enterprise_breach_watch, enterprise_audit_and_reporting
```

</details>

<details>

<summary>Python CLI</summary>

**Command:** `msp-info`\
**Alias:** `mi`

**Parameters** : `-p, --pricing` - Display pricing information. -\
`-r, --restriction` - Display MSP restriction information. -\
`-v, --verbose` - Print additional managed-company details. -\
`-mc, --managed-company COMPANY` - Filter managed-company information\
by name or ID. - Shared report-output options -Use `msp-info --help`\
for the exact options supported by the installed CLI.

**Examples**

```
My Vault> msp-info
My Vault> msp-info --pricing
My Vault> msp-info --restriction
My Vault> msp-info --managed-company "Company A" --verbose
```

</details>

<details open>

<summary>Python SDK</summary>

**Function:** `msp_info`

```python
report = msp_auth.msp_info(
    loader,
    restriction=False,
    pricing=True,
    managed_company=None,
    verbose=True,
)
```

The SDK returns an MSP report. if both `restriction`\
and `pricing` are enabled, the implementation prioritizes restriction\
information.

</details>

### MSP Refresh Data <a href="#msp-refresh-data" id="msp-refresh-data"></a>

Refreshes local enterprise/MSP data from the server. Use after making changes or to ensure you have the latest managed company list and licenses.

<details>

<summary>DotNet CLI</summary>

**Command:** `enterprise-get-data` or `msp-down` or `md`

**Flags:** None

**Example:**

```sh
My Vault> enterprise-get-data
My Vault> md
```

</details>

<details>

<summary>DotNet SDK</summary>

**Function:** Reload enterprise data (including MSP data when applicable)

```csharp
await context.Enterprise.Load();
```

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Sync-KeeperEnterprise`

Use after switching MC/MSP or to refresh MSP data.

**Example:**

```powershell
PS> Sync-KeeperEnterprise
```

</details>

<details>

<summary>Python CLI</summary>

**Command:** `msp-down`\
**Alias:** `md`

**Parameters** :

`--reset` -Clear the synchronization continuation\
token and reload enterprise data from scratch.

**Example**

```
My Vault> msp-down --reset
```

</details>

<details>

<summary>Python SDK</summary>

**Function:** `msp_down`

```python
touched_entity_type_ids = msp_auth.msp_down(loader)
# Force a full reload:
touched_entity_type_ids = msp_auth.msp_down(loader, reset=True)
```

</details>

### MSP Create <a href="#msp-create" id="msp-create"></a>

Creates a new managed company with the given name, plan, seats, and optional node, storage, and addons. The [add-ons are mentioned here](#msp-addon-options).

<details>

<summary>DotNet CLI</summary>

**Command:** `mc-create <NAME>` or `msp-add` or `ma`

**Flags:**

* `--product` or `-p` : Product plan: `business`, `businessPlus`, `enterprise`, `enterprisePlus`
* `--seats` or `-s` : Maximum number of seats (-1 = unlimited)
* `--node` : Node name or ID (default: root)
* `--storage` : Storage plan: `100GB`, `1TB`, `10TB`
* `--addons` : Comma-separated addons , e.g. `secrets_manager,connection_manager:5`

**Example:**

```sh
My Vault> mc-create "New MC" --product=enterprise --seats=10
"new_mc_1" --seats=15 --product=enterprise --node=test1 --storage=100GB --addons="secrets_manager,enterprise_breach_watch"                   
Managed Company "new_mc_1", ID:314913 has been created.
```

</details>

<details>

<summary>DotNet SDK</summary>

**Function:** `CreateManagedCompany(ManagedCompanyOptions options)`

**Example:**

```csharp
var options = new ManagedCompanyOptions
{
    Name = "New MC",
    ProductId = "enterprise",
    NumberOfSeats = 10,
    FilePlanType = "1TB",
    NodeId = nodeId 
};
var mc = await managedCompanyData.CreateManagedCompany(options);
Console.WriteLine($"Created MC: {mc.EnterpriseName}, ID: {mc.EnterpriseId}");
```

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `New-KeeperManagedCompany`

**Aliases:** `kamc`

**Flags:**

<table><thead><tr><th width="145.6708984375">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Display name of the new MC.</td></tr><tr><td><strong>PlanId</strong></td><td>License plan: <code>business</code>, <code>businessPlus</code>, <code>enterprise</code>, <code>enterprisePlus</code>.</td></tr><tr><td><strong>MaximumSeats</strong></td><td>Maximum number of seats (licenses).</td></tr><tr><td><strong>Storage</strong></td><td>File storage plan: <code>100GB</code>, <code>1TB</code>, <code>10TB</code>.</td></tr><tr><td><strong>Addons</strong></td><td>Array of add-on names; use <code>AddonName:Seats</code> for add-ons with seats (e.g. <code>connection_manager:5</code>).</td></tr><tr><td><strong>Node</strong></td><td>Node name or ID to attach the MC to. If omitted, root node is used.</td></tr></tbody></table>

**Example:**

```powershell
PS> New-KeeperManagedCompany -Name "New MC" -PlanId enterprise -MaximumSeats 10
PS> New-KeeperManagedCompany -Name "New MC" -PlanId enterprise -MaximumSeats 10 -Storage 1TB -Node "Branch"
PS> New-KeeperManagedCompany -Name "new_mc_2" -PlanId enterprise -MaximumSeats 15 -Storage 100GB -Node test1 -Addons "secrets_manager,enterprise_breach_watch"
```

</details>

<details>

<summary>Python CLI</summary>

**Command:** `msp-add`

**Alias:** `ma`

**Parameters**

* `NAME` - Managed-company name. Required.
* `-p, --plan PLAN` --License plan. Required; choices are validated\
  against the SDK's MSP plan constants.
* `--node NODE` - Node name or node ID. Defaults to the enterprise\
  root.
* `-s, --seats SEATS` -Maximum licences allowed. Use `-1` for\
  unlimited when permitted.
* `-f, --file-plan FILE_PLAN` -File-storage plan.
* `-a, --addon ADDON[:SEATS]` -Add-on specification. May be\
  repeated.

**Example:**

{% code overflow="wrap" %}

```
My Vault> msp-add "New MC" --plan enterprise --seats 10 Managed company "New MC" added. ID=<managed_company_id>
```

{% endcode %}

</details>

<details>

<summary>Python SDK</summary>

**Function:** `msp_add_managed_company`

{% code overflow="wrap" %}

```python
mc_id = msp_auth.msp_add_managed_company(
    loader,
    enterprise_name="New MC",
    plan="enterprise",
    node_id=root_node_id,
    seats=10,
    file_plan="STORAGE_100GB",
    addons=["connection_manager:5"],
)
```

{% endcode %}

`node_id` is required by the SDK function.

</details>

### MSP Update <a href="#msp-update" id="msp-update"></a>

Updates an existing managed company’s name, product, seats, storage, node, or addons.

<details>

<summary>DotNet CLI</summary>

**Command:** `mc-update <COMPANY>` or `msp-update` or `mu`

**Flags:**

* `--name` : New managed company name
* `--product` or `-p` : Product plan
* `--seats` or `-s` : Maximum seats
* `--node` : Node name or ID
* `--storage` : Storage plan
* `--addons` : Comma-separated addons

**Value:** `COMPANY` = managed company name or ID (required)

**Example:**

```sh
My Vault> mc-update 3861 --seats=20 --product=enterprisePlus
My Vault> mc-update "Company 1" --name="Company 1 Updated"
Managed Company "Company 1 Updated", ID:3861 has been updated.
```

</details>

<details>

<summary>DotNet SDK</summary>

**Function:** `UpdateManagedCompany(int companyId, ManagedCompanyOptions options)`

**Example:**

```csharp
var options = new ManagedCompanyOptions
{
    NumberOfSeats = 20,
    ProductId = "enterprisePlus"
};
var updated = await managedCompanyData.UpdateManagedCompany(3861, options);
```

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Edit-KeeperManagedCompany`

**Aliases:** `kemc`

**Flags:**

* `-Id` : Managed company name or ID (required, position 0)
* `-Name` : New name
* `-PlanId` : Plan
* `-MaximumSeats` : Seats
* `-Storage` : 100GB, 1TB, 10TB
* `-Addons` : Addons
* `-Node` : Node name or ID

**Example:**

```powershell
PS> Edit-KeeperManagedCompany -Id 3861 -MaximumSeats 20 -PlanId enterprisePlus
PS> Edit-KeeperManagedCompany -Id new_mc_2 -Name "New Managed Company"                                                              
                          
CompanyId CompanyName         PlanId     PlanName   FilePlanName Allocated Active
--------- -----------         ------     --------   ------------ --------- ------
314915    New Managed Company enterprise Enterprise 100GB               15      0
```

</details>

<details>

<summary>Python CLI</summary>

**Command:** `msp-update`\
**Alias:** `mu`

**Parameters** :

`MC` - Managed-company name or ID.

`--node NODE`- Destination node name or ID.

`--n, --name NAME` -New company name.

`--p, --plan PLAN` - New product plan.

`--s, --seats SEATS`- Maximum licences allowed; `-1` requests unlimited when permitted. -\
`-f, --file-plan FILE_PLAN` - New file-storage plan. -\
`-aa, --add-addon ADDON[:SEATS]` - Add or update an add-on; can be\
repeated. - `-ra, --remove-addon ADDON` --Remove an add-on; can be\
repeated.

**Examples**

```
My Vault> msp-update "Company A" --name "Company A East" --seats 15
My Vault> msp-update 123456 --add-addon connection_manager:5
My Vault> msp-update "Company A East" --remove-addon secrets_manager
```

</details>

<details>

<summary>Python SDK</summary>

**Function:** `msp_update_managed_company`

```python
updated_company_id = msp_auth.msp_update_managed_company(
    loader,
    managed_company="Company A",
    node_id=None,
    new_name="Company A East",
    plan=None,
    seats=15,
    file_plan=None,
    add_addons=["connection_manager:5"],
    remove_addons=["secrets_manager"],
)
```

Only the supplied update fields are changed. Use `node_id` when moving\
the company to a different enterprise node.

</details>

### MSP Delete <a href="#msp-delete" id="msp-delete"></a>

Removes a managed company by name or ID.

<details>

<summary>DotNet CLI</summary>

**Command:** `mc-delete <COMPANY>` or `msp-remove` or `mrm`

**Flags:** None

**Value:** `COMPANY` = managed company name or ID (required)

**Example:**

```sh
My Vault> mc-delete 3861
My Vault> mc-delete "Company 1"
Managed Company "Company 1", ID:3861 has been removed.
```

</details>

<details>

<summary>DotNet SDK</summary>

**Function:** `RemoveManagedCompany(int companyId)`

**Example:**

```csharp
await managedCompanyData.RemoveManagedCompany(3861);
```

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Remove-KeeperManagedCompany`

**Aliases:** `krmc`

**Flags:**

* Position 0 : Managed company name or ID (required)

**Example:**

```powershell
PS> Remove-KeeperManagedCompany 3861
PS> Remove-KeeperManagedCompany "Company 1"
```

</details>

<details>

<summary>Python CLI</summary>

**Command:** `msp-remove`\
**Alias:** `mrm`

**Parameters** :

`MC` - Managed-company name or ID.

\- `-f, --force` -Skip the confirmation prompt.

**Examples**

```
My Vault> msp-remove "Company A"
My Vault> msp-remove --force 314913
```

Without `--force`, the CLI asks for confirmation. The prompt defaults to\
no. The CLI warns that removing a company expires its licences and\
removes the MSP administrator's access to its admin console.

</details>

<details>

<summary>Python SDK</summary>

**Function:** `msp_remove_managed_company`

```python
removed_company_id = msp_auth.msp_remove_managed_company(
    loader,
    managed_company="Company A",
)
```

</details>

### MSP Login (Switch to MC) <a href="#msp-login-switch-to-mc" id="msp-login-switch-to-mc"></a>

Switches the CLI context to a managed company so that subsequent commands run in that MC’s context. DotNet CLI uses a dedicated MC context; PowerCommander sets the current managed company ID and syncs.

<details>

<summary>DotNet CLI</summary>

**Command:** `mc-login <MC_COMPANY_ID>`

**Flags:** None

**Value:** `MC_COMPANY_ID` = managed company ID (required). Use `mc-list` to see IDs.

**Example:**

```sh
My Vault> mc-login 3987
# Prompt changes to "Managed Company"; subsequent commands run in MC context
```

</details>

<details>

<summary>DotNet SDK</summary>

**Function:** `LoginToManagedCompany(IEnterpriseLoader enterprise, int mcEnterpriseId)` (on `ManagedCompanyAuth`)

**Example:**

```csharp
var mcAuth = new ManagedCompanyAuth();
await mcAuth.LoginToManagedCompany(enterprise, 3987);
// Use mcAuth as the new auth/enterprise context for MC operations
```

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Switch-KeeperMC`

**Aliases:** `switch-to-mc`

**Flags:**

* `-Name` (position 0) : Managed company ID or name (required)

**Example:**

```powershell
PS> Switch-KeeperMC 3987
PS> switch-to-mc "Company Name"
Switched to MC "Company Name"
```

</details>

<details>

<summary>Python CLI</summary>

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

**Parameters** :

`MC_ID` -Numeric managed-company enterprise ID.

**Example**

```
My Vault> switch-to-mc 123456
Switching to managed company 123456...
Successfully switched to managed company 123456
Use "q" to return to the previous context
```

</details>

<details>

<summary>Python SDK</summary>

**Function:** `login_to_managed_company`

```python
mc_auth, mc_tree_key = msp_auth.login_to_managed_company(
    loader,
    mc_enterprise_id=123456,
)
```

The SDK returns a managed-company `KeeperAuth` instance and the\
decrypted managed-company tree key.

</details>

### MSP Copy Role <a href="#msp-convert-node" id="msp-convert-node"></a>

Copy one or more **roles** (with their **enforcements**) from the MSP enterprise into one or more Managed Companies.

<details>

<summary>DotNet CLI</summary>

Coming Soon

</details>

<details>

<summary>DotNet SDK</summary>

**Function:** `ConvertNodeToManagedCompanyAsync(NodeToManagedCompanyRequest request)`

**Example:**

```csharp
var request = new NodeToManagedCompanyRequest { CompanyId = companyId };
// Optionally populate Nodes, Roles, Users, RoleKeys, TeamKeys, UsersDataKeys
// with re-encrypted data for the MC.
await managedCompanyData.ConvertNodeToManagedCompanyAsync(request);
await enterprise.Load();
```

</details>

<details>

<summary>PowerCommander</summary>

**Command:**`Copy-KeeperMCRole`

**Flags:**

<table><thead><tr><th width="207.7509765625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Role</strong></td><td>Source role <strong>name</strong> or <strong>ID</strong>. Can be repeated (e.g. multiple roles). Resolved in the MSP enterprise.</td></tr><tr><td><strong>ManagedCompany</strong></td><td>Target MC <strong>name</strong> or <strong>ID</strong>. Can be repeated (e.g. multiple MCs).</td></tr></tbody></table>

Example:

```ps1
PS> Copy-KeeperMCRole -Role "Auditor", "Help Desk" -ManagedCompany "Acme"
```

</details>

<details>

<summary>Python CLI</summary>

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

**Parameters** :

`-r, --role ROLE` -Source role name or role ID; can\
be repeated.

\- `MC` -One or more managed-company names or IDs. At\
least one role and one company are required.

**Example:**

```
My Vault> msp-copy-role --role "Help Desk" --role 123456 "Company A" "Company B"
Roles synced to 2 managed companies
```

</details>

<details>

<summary>Python SDK</summary>

**Function:** `msp_copy_role`

```python
synced_company_ids = msp_auth.msp_copy_role(
    loader,
    roles=["Help Desk", "123456"],
    managed_companies=["Company A", "Company B"],
)
```

Roles are matched by ID or case-insensitive exact name. Missing\
destination roles are created; destination role enforcements are\
synchronized to match the source.

</details>

### MSP Switch to MSP <a href="#msp-switch-to-msp" id="msp-switch-to-msp"></a>

Switches context back to MSP when currently in a managed company context. Basically logs you out of managed company.

<details>

<summary>DotNet CLI</summary>

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

**Flags:** None

**Example:**

```sh
Managed Company> switch-to-msp
Managed Company> msp
# Or use "exit" to return to MSP context
# Prompt returns to "My Vault"
```

</details>

<details>

<summary>DotNet SDK</summary>

No direct SDK call; context switching is handled by the CLI/shell. When using `ManagedCompanyAuth`, the application would switch back to the parent auth/context that was stored when entering MC context.

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Switch-KeeperMSP`

**Aliases:** `switch-to-msp`

**Flags:** None

**Example:**

```powershell
PS> Switch-KeeperMSP
PS> switch-to-msp
Switched to MSP
```

</details>

<details>

<summary>Python CLI</summary>

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

**Parameters:** None.

**Example**

```
My Vault> switch-to-msp
Switched back to MSP
```

The CLI restores the saved MSP command context. If no saved context\
exists, it reports `Already MSP`.

</details>

<details>

<summary>Python SDK</summary>

**Function:** `switch_to_msp`

```python
touched_entity_type_ids = msp_auth.switch_to_msp(loader)
```

The SDK refreshes MSP enterprise data. Saving and restoring the active\
CLI context is handled by the CLI layer.

</details>

### MSP Billing Report Command <a href="#msp-delete" id="msp-delete"></a>

Generate the **MSP Consumption Billing Statement** for a given month. Requires MSP account.

<details>

<summary>DotNet CLI</summary>

**Command:** `mc-delete <COMPANY>` or `msp-remove` or `mrm`

**Flags:** None

**Value:** `COMPANY` = managed company name or ID (required)

**Example:**

```sh
My Vault> mc-delete 3861
My Vault> mc-delete "Company 1"
Managed Company "Company 1", ID:3861 has been removed.
```

</details>

<details>

<summary>DotNet SDK</summary>

**Function:** `RemoveManagedCompany(int companyId)`

**Example:**

```csharp
await managedCompanyData.RemoveManagedCompany(3861);
```

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Get-MspBillingReport`

**Parameters**

<table><thead><tr><th width="185.98828125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Month</strong></td><td>Month as <strong>1–12</strong> (numeric) or <strong>YYYY-MM</strong> (e.g. <code>2022-02</code>). If omitted, <strong>previous calendar month</strong> is used.</td></tr><tr><td><strong>Year</strong></td><td>Year (e.g. <code>2022</code>). Used when <strong>Month</strong> is numeric only.</td></tr><tr><td><strong>ShowDate</strong></td><td>Break down the report by date.</td></tr><tr><td><strong>ShowCompany</strong></td><td>Break down the report by managed company.</td></tr><tr><td><strong>Format</strong></td><td><code>table</code> (default), <code>json</code>, or <code>csv</code>.</td></tr><tr><td><strong>Output</strong></td><td>If set, save the report to this file path.</td></tr></tbody></table>

**Examples:**

```ps1
# Previous month (default)
Get-MspBillingReport

# Specific month
Get-MspBillingReport -Year 2025 -Month 11  
Consumption Billing Statement: November 2025


Product                        Licenses Rate AvgPerDay InitialLicenses FinalLicenses MaxLicenses
-------                        -------- ---- --------- --------------- ------------- -----------
enterprise                           30          1.000               1             1           1
enterprise_audit_and_reporting       30          1.000               1             1           1
enterprise_breach_watch              30          1.000               1             1           1
compliance_report                    30          1.000               1             1           1

=======================================================================================
Get-MspBillingReport -Year 2026 -Month 1  
Consumption Billing Statement: January 2026


Product                           Licenses Rate AvgPerDay InitialLicenses FinalLicenses MaxLicenses
-------                           -------- ---- --------- --------------- ------------- -----------
business                                31          1.000               1             1           1
enterprise                              64          2.060               2             3           3
enterprisePlus                          30          0.970               0             2           3
Product 10000                           60          1.940               1             3           3
enterprise_audit_and_reporting          58          1.870               1             2           2
enterprise_breach_watch                 31          1.000               1             1           1
msp_service_and_support                 29          0.940               0             2           2
compliance_report                       60          1.940               1             3           3
secrets_manager                          0          0.000               0             0           0
connection_manager                      64          2.060               0             3           3
remote_browser_isolation                64          2.060               0             3           3
privileged_access_manager               48          1.550               0             3           3
keeper_endpoint_privilege_manager        0          0.000               0             0           0
```

</details>

<details>

<summary>Python CLI</summary>

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

**Alias:** `mbr`

**Parameters** :

`--month YYYY-MM` - Month for the report. Defaults to\
the previous calendar month.

`-d, --show-date` - Break down the\
report by date.

`-c, --show-company` - Break down the report by\
managed company. - Shared report-output options -Supported by the\
common CLI report parser; run

`msp-billing-report --help` for exact options.

**Example:**

{% code overflow="wrap" %}

```
My Vault> msp-billing-report --month 2026-09 --show-company
```

{% endcode %}

</details>

<details>

<summary>Python SDK</summary>

**Function:** `msp_billing_report`

```python
report = msp_auth.msp_billing_report(
    loader,
    month="2026-09",
    show_date=False,
    show_company=True,
)
```

When `month` is omitted, the SDK reports the previous calendar month.\
`month` must use `YYYY-MM`.

</details>

### MSP Convert Node

Converts an MSP enterprise subtree (a node and its descendants) into a\
managed company.

<details>

<summary>DotNet CLI</summary>

Coming soon

</details>

<details>

<summary>DotNet SDK</summary>

Coming soon

</details>

<details>

<summary>PowerCommander</summary>

Coming soon

</details>

<details>

<summary>Python CLI</summary>

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

**Parameters** :

`NODE` -Subtree root node name or ID. -\
`-s, --seats SEATS` -Seat count for a newly registered managed\
company; defaults based on the subtree's user count.

`- -p, --plan PLAN` - Product plan for a newly registered managed company; defaults to\
`business`.

**Example**

```
My Vault> msp-convert-node --seats 10 --plan business "Test Node"
Node "Test Node" was converted to managed company id=<managed_company_id>
```

</details>

<details>

<summary>Python SDK</summary>

**Function:** `msp_convert_node`

```python
mc_id = msp_auth.msp_convert_node(
    loader,
    node_id=node_id,
    seats=10,
    plan="business",
)
```

The enterprise root cannot be converted. The SDK validates the subtree\
before performing the conversion.

</details>

### MSP Legacy Report

Generates the legacy MSP licence-adjustment report.

<details>

<summary>DotNet CLI</summary>

Coming soon

</details>

<details>

<summary>DotNet SDK</summary>

Coming soon

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Get-KeeperMspLegacyReport`

**Aliase:** `msp-legacy-report`

**Flags:**

* `-Range`: `today`, `yesterday`, `last_7_days`, `last_30_days` (default), `month_to_date`, `last_month`, `year_to_date`, or `last_year`
* `-From`: Custom start date (`YYYY-MM-dd`) or Unix timestamp
* `-To`: Custom end date (`YYYY-MM-dd`) or Unix timestamp
* `-Format`: `table` (default), `json`, or `csv`
* `-Output`: Output file path

**Example:**

```powershell
PS> Get-KeeperMspLegacyReport -Range last_7_days
PS> msp-legacy-report -From "2025-01-01" -To "2025-01-31" -Format csv -Output "legacy-report.csv"
```

</details>

<details>

<summary>Python CLI</summary>

**Command:** `msp-legacy-report`\
**Alias:** `mlr`

**Parameters** :

`--range RANGE` --- Predefined range; defaults to\
`last_30_days`.

`--from DATE` - Custom start date as `YYYY-MM-DD` or\
a Unix timestamp.

`--to DATE` - Custom end date as `YYYY-MM-DD` or a\
Unix timestamp. - Shared report-output options - Supported by the\
common CLI report parser.

**Predefined ranges** - `today` - `yesterday` - `last_7_days` -\
`last_30_days` - `month_to_date` - `last_month` - `year_to_date` -\
`last_year`

**Examples**

```
My Vault> msp-legacy-report
My Vault> msp-legacy-report --range last_7_days
My Vault> msp-legacy-report --from 2026-09-01 --to 2026-09-30
```

</details>

<details>

<summary>Python SDK</summary>

**Function:** `msp_legacy_report`

```python
report = msp_auth.msp_legacy_report(
    loader,
    range_name="last_30_days",
    from_date=None,
    to_date=None,
)
```

The SDK uses the custom date range only when both `from_date` and\
`to_date` are supplied; otherwise, it uses `range_name`.

</details>

### 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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keeper.io/keeperpam/commander-sdk/keeper-commander-sdks/sdk-command-reference/msp-management-commands.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
