Get-AzBillingInvoice
Get billing invoices of the subscription. Get billing invoices of a billing account and billing profile
Syntax
Get-AzBillingInvoice
[-MaxCount <Int32>]
[-GenerateDownloadUrl]
[-DefaultProfile <IAzureContextContainer>]
[-BillingAccountName]
[-BillingProfileName]
[<CommonParameters>]
Get-AzBillingInvoice
[-Latest]
[-DefaultProfile <IAzureContextContainer>]
[-BillingAccountName]
[-BillingProfileName]
[<CommonParameters>]
Get-AzBillingInvoice
-Name <System.Collections.Generic.List`1[System.String]>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzBillingInvoice cmdlet gets billing invoices of the subscription.
Examples
Example 1
Get-AzBillingInvoice -Latest
Get the latest invoice of the subscription.
Example 2
Get-AzBillingInvoice -Name 2017-02-18-432543543
Get the invoice of the subscription with the specified name.
Example 3
Get-AzBillingInvoice
Get all available invoices of the subscription in reverse chronological order beginning with the most recent invoice without download Url.
Example 4
Get-AzBillingInvoice -GenerateDownloadUrl -MaxCount 10
Get most recent 10 invoices of the subscription and include the download Url in the result.
Example 5
Get-AzBillingInvoice -Name 2017-02-18-432543543 -GenerateDownloadUrl
Get the specific invoice by name and include download url in the result.
Example 6
Get-AzBillingInvoice -BillingAccountName 00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_0000-00-00 -GenerateDownloadUrl
Get invoices by billing account name and include download url for each invoice in the result.
Example 7
Get-AzBillingInvoice -Name 0000000000 -BillingAccountName 00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_0000-00-00 -GenerateDownloadUrl
Get specific invoice by invoice name and billing account name and include download url for each invoice in the result.
Example 8
Get-AzBillingInvoice -Latest -BillingAccountName 00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_0000-00-00 -GenerateDownloadUrl
Get latest invoice by billing account name and include download url for invoice in the result.
Example 9
Get-AzBillingInvoice -GenerateDownloadUrl -BillingAccountName 00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_0000-00-00 -BillingProfileName 0000-0000-000-000 -MaxCount 10
Get most recent 10 invoices of the specific billing account and specific billing profile and include the download Url in the result.
Example 10
Get-AzBillingInvoice -Latest -GenerateDownloadUrl -BillingAccountName 00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_0000-00-00 -BillingProfileName 0000-0000-000-000
Get latest invoice by billing account name and billing profile name and include download url for invoice in the result.
Example 11
Get-AzBillingInvoice -BillingAccountName 00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_0000-00-00 -BillingProfileName 0000-0000-000-000 -PeriodStartDate 0000-00-00 -PeriodEndDate 0000-00-00
Get invoices by billing account name and billing profile name for a billing period specified by perioStart date and periodEnd date.
Parameters
-BillingAccountName
Name of a specific billing account to get invoices for.
Type: | List<T>[String] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BillingProfileName
Name of a specific billing profile to get invoices for.
Type: | List<T>[String] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GenerateDownloadUrl
Generate the download url of the invoices.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Latest
Get the latest invoice.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxCount
Determines the maximum number of records to return.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Name of a specific invoice to get or the most recent if not specified.
Type: | List<T>[String] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PeriodEndDate
End date for invoice.
Type: | List<T>[String] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PeriodStartDate
Start date for invoice.
Type: | List<T>[String] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None