Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To use PowerShell's Invoke-AzCostManagementQuery for timeframes that are not predefined, you can use the "Timeframe" parameter and specify a custom time range using the "Start" and "End" parameters. For example:

Invoke-AzCostManagementQuery -Timeframe Custom -Start "2022-01-01" -End "2022-01-31" -Query "..."

In this example, we are specifying a custom timeframe starting on January 1st, 2022 and ending on January 31st, 2022. The "Query" parameter would be filled in with the desired query to retrieve cost data for that time range.