# MSP Legacy Report Command

### MSP Legacy Report Command

This command/function helps to display a Report by Retriving the MSP legacy license adjustment log from the Keeper server. The command supports both predefined date ranges (e.g., last 7 days, last month) and custom date ranges. Results can be rendered as a table, exported to CSV, or output as JSON, and optionally saved to a file.

<details>

<summary>DotNet CLI</summary>

**Coming Soon**

</details>

<details>

<summary>DotNet SDK</summary>

Comming Soon

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Get-KeeperMspLegacyReport`

**Alias:** `msp-legacy-report`

**Parameter:**

`-Range` - Predefined date range. Valid values: `today`, `yesterday`, `last_7_days`, `last_30_days`, `month_to_date`, `last_month`, `year_to_date`, `last_year`. Ignored when `-From` and `-To` are provided.

`-From` - Custom start date in this format (`YYYY-MM-dd`) or as a Unix timestamp (seconds). Must be used together with `-To`.

`-To` - Custom end date in this format (`YYYY-MM-dd`) or as a Unix timestamp (seconds). Must be used together with `-From`

`-Format` - Output format: `table`, `json`, or `csv`

`-Output` - Path to write the report to a file

**Examples:**

{% code overflow="wrap" %}

```powershell
# Default: last 30 days, table format
PS > Get-KeeperMspLegacyReport

# Using alias
PS > msp-legacy-report

# Predefined range
PS > Get-KeeperMspLegacyReport -Range last_7_days

# Custom date range
PS > Get-KeeperMspLegacyReport -From "2025-01-01" -To "2025-06-30"

# Export as CSV to a file
PS > Get-KeeperMspLegacyReport -Range last_month -Format csv -Output "legacy_report.csv"

# Export as JSON to console
PS > Get-KeeperMspLegacyReport -Range year_to_date -Format json
```

{% endcode %}

</details>

<details>

<summary>Python CLI</summary>

Comming Soon

</details>

<details>

<summary>Python SDK</summary>

Comming Soon

</details>


---

# 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/keeperpam/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/msp-legacy-report-command.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.
