-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Closed
Copy link
Labels
Cost Management - QueryAll issues in cost management and Consumption for query API associated to tags, dimensions and forecAll issues in cost management and Consumption for query API associated to tags, dimensions and forecService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reported
Description
Description
Invoke-AzCostManagementQuery
from Az.Billing
v2.2.0 adds two empty lines to terminal before showing the output. This even happens if assigning output to a variable.
This messes up script output.
Expected behavior (no empty lines):
PS > $ConsumptionLastWeek = $(
Invoke-AzCostManagementQuery -DatasetAggregation @{
'totalCost' = @{
'name' = [string] 'Cost'
'function' = [string] 'SUM'
}
} -Type 'ActualCost' -Timeframe 'Custom' `
-Scope ('/subscriptions/{0}' -f $Subscription.'Id') `
-TimePeriodFrom $EndOfTwoWeeksAgo.ToString('o') `
-TimePeriodTo $EndOfLastWeek.ToString('o')
)
PS >
Actual behavior (two empty lines):
PS > $ConsumptionLastWeek = $(
Invoke-AzCostManagementQuery -DatasetAggregation @{
'totalCost' = @{
'name' = [string] 'Cost'
'function' = [string] 'SUM'
}
} -Type 'ActualCost' -Timeframe 'Custom' `
-Scope ('/subscriptions/{0}' -f $Subscription.'Id') `
-TimePeriodFrom $EndOfTwoWeeksAgo.ToString('o') `
-TimePeriodTo $EndOfLastWeek.ToString('o')
)
PS >
Issue script & Debug output
There are no errors.
Environment data
Windows 11 24H2 x64
PowerShell v7.5.0 x64
Az.Billing v2.2.0
Module versions
Az.Billing v2.2.0
Error output
There are no errors.
Metadata
Metadata
Assignees
Labels
Cost Management - QueryAll issues in cost management and Consumption for query API associated to tags, dimensions and forecAll issues in cost management and Consumption for query API associated to tags, dimensions and forecService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reported