Edit

Share via


Get-AzBillingAccount

Get billing accounts.

Syntax

List (Default)

Get-AzBillingAccount
    [-IncludeAddress]
    [-ExpandBillingProfile]
    [-ExpandInvoiceSection]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Single

Get-AzBillingAccount
    -Name <System.Collections.Generic.List`1[System.String]>
    [-IncludeAddress]
    [-ExpandBillingProfile]
    [-ExpandInvoiceSection]
    [-ListEntitiesToCreateSubscription]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzBillingAccount cmdlet gets billing accounts, user has access to.

Examples

Example 1

Get-AzBillingAccount

Get all billing accounts user has access to.

Example 2

Get-AzBillingAccount -Name 00000000-0000-0000-0000-000000000000

Get the billing account with the specified name.

Example 3

Get-AzBillingAccount -IncludeAddress

Get all billing accounts user has access to, and include the address in the result.

Example 4

Get-AzBillingAccount -ExpandBillingProfile

Get all billing accounts user has access to, and include the billing profiles in the result.

Example 5

Get-AzBillingAccount -ExpandInvoiceSection

Get all billing accounts user has access to, and include the billing profiles and invoice sections under them in the result.

Example 6

Get-AzBillingAccount -ExpandInvoiceSection -IncludeAddress -ExpandBillingProfile -Name 00000000-0000-0000-0000-000000000000

Get the billing account with the specified name, and include the address, billing profiles and invoice sections under them in the result.

Parameters

-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

-ExpandBillingProfile

Include the billing profiles under the billing account.

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

-ExpandInvoiceSection

Include the billing profiles under billing account and invoices sections under them.

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

-IncludeAddress

Include the address of the billing account.

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

-ListEntitiesToCreateSubscription

List the billing entities under billing account which can be used as input to create subscription.

Parameter properties

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

Parameter sets

Single
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 billing account.

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

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

PSBillingAccount