Start-FinOpsCostExport Initiates a Cost Management export run for the most recent period.
On this page
The Start-FinOpsCostExport command runs a Cost Management export for the most recent period using the Run API.
This command has been tested with the following API versions:
- 2023-07-01-preview (default) – Enables FocusCost and other datasets.
- 2023-08-01
🧮 Syntax
Start-FinOpsCostExport `
[-Name] <string> `
[-Scope <string>] `
[-StartDate <datetime>] `
[-EndDate <datetime>] `
[-Backfill <number>] `
[-ApiVersion <string>]
📥 Parameters
Name | Description |
---|---|
‑Name | Required. Name of the export. |
‑Scope | Optional. Resource ID of the scope to export data for. If empty, defaults to current subscription context. |
‑StartDate | Optional. Day to start pulling the data for. If not set, the export will use the dates defined in the export configuration. |
‑EndDate | Optional. Last day to pull data for. If not set and -StartDate is set, -EndDate will use the last day of the month. If not set and -StartDate is not set, the export will use the dates defined in the export configuration. |
‑Backfill | Optional. Number of months to export the data for. Make note of throttling (429) errors. This is only run once. Failed exports are not re-attempted. Default = 0. |
‑ApiVersion | Optional. API version to use when calling the Cost Management Exports API. Default = 2023-07-01-preview. |
🌟 Examples
Export configured period
Start-FinopsCostExport -Name 'CostExport'
Runs an export called ‘CostExport’ for the configured period.
Export specific dates
Start-FinopsCostExport -Name 'CostExport' -StartDate '2023-01-01' -EndDate '2023-12-31'
Runs an export called ‘CostExport’ for a specific date range.
Backfill export
Start-FinopsCostExport -Name 'CostExport' -Backfill 12
Runs an export called ‘CostExport’ for the previous 12 months.
🧰 Related tools
- 🏦 FinOps hubs – Open, extensible, and scalable cost reporting.
- 📊 Power BI reports – Accelerate your reporting with Power BI starter kits.