Edit

Share via


Get-AzBillingInvoice

Get billing invoices of the subscription. Get billing invoices of a billing account and billing profile

Syntax

List (Default)

Get-AzBillingInvoice
    [-MaxCount <Int32>]
    [-GenerateDownloadUrl]
    [-DefaultProfile <IAzureContextContainer>]
    [-BillingAccountName]
    [-BillingProfileName]
    [<CommonParameters>]

Latest

Get-AzBillingInvoice
    [-Latest]
    [-DefaultProfile <IAzureContextContainer>]
    [-BillingAccountName]
    [-BillingProfileName]
    [<CommonParameters>]

Single

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 periodStart date and periodEnd date.

Parameters

-BillingAccountName

Name of a specific billing account to get invoices for.

Parameter properties

Type:

List<T>[String]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BillingProfileName

Name of a specific billing profile to get invoices for.

Parameter properties

Type:

List<T>[String]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-GenerateDownloadUrl

Generate the download url of the invoices.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Latest

Get the latest invoice.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Latest
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxCount

Determines the maximum number of records to return.

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Name of a specific invoice to get or the most recent if not specified.

Parameter properties

Type:

List<T>[String]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Single
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PeriodEndDate

End date for invoice.

Parameter properties

Type:

List<T>[String]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PeriodStartDate

Start date for invoice.

Parameter properties

Type:

List<T>[String]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

PSInvoice