Get-AzureRmBillingInvoice

Get billing invoices of the subscription.

Syntax

Get-AzureRmBillingInvoice
   [-MaxCount <Int32>]
   [-GenerateDownloadUrl]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmBillingInvoice
   [-Latest]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmBillingInvoice
   -Name <System.Collections.Generic.List`1[System.String]>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzureRmBillingInvoice cmdlet gets billing invoices of the subscription.

Examples

Example 1

PS C:\> Get-AzureRmBillingInvoice -Latest

Get the latest invoice of the subscription.

Example 2

PS C:\> Get-AzureRmBillingInvoice -Name 2017-02-18-432543543

Get the invoice of the subscription with the specified name.

Example 3

PS C:\> Get-AzureRmBillingInvoice

Get all available invoices of the subscription in reverse chronological order beginning with the most recent invoice without download Url.

Example 4

PS C:\> Get-AzureRmBillingInvoice -GenerateDownloadUrl -MaxCount 10

Get most recent 10 invoices of the subscription and include the download Url in the result.

Required Parameters

-Latest

Get the latest invoice.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

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

Type:System.Collections.Generic.List`1[System.String]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-DefaultProfile

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-GenerateDownloadUrl

Generate the download url of the invoices.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MaxCount

Determines the maximum number of records to return.

Type:System.Nullable`1[System.Int32]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Collections.Generic.List`1[[Microsoft.Azure.Management.Billing.Models.Invoice, Microsoft.Azure.Commands.Billing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Microsoft.Azure.Management.Billing.Models.Invoice