Share via


Get-AzsSubscription

Gets details about particular subscription.

Syntax

List (Default)

Get-AzsSubscription
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Get

Get-AzsSubscription
    -SubscriptionId <String[]>
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

GetViaIdentity

Get-AzsSubscription
    -INPUTOBJECT
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Description

Gets details about particular subscription.

Examples

Example 1

PS C:\> Get-AzsSubscription | fl *

DisplayName    : Test User
Id             : /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e
OfferId        : /delegatedProviders/default/offers/TestOffer-590376ac-c8dd-4b3d-9674-b5b8fcde095b
State          : Enabled
SubscriptionId : aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e
TenantId       : aaaabbbb-0000-cccc-1111-dddd2222eeee

DisplayName    : cnur
Id             : /subscriptions/bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f
OfferId        : /delegatedProviders/default/offers/cnur4866tenantsubsvcoffer843
State          : Enabled
SubscriptionId : bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f
TenantId       : aaaabbbb-0000-cccc-1111-dddd2222eeee

Get the list of subscriptions.

Parameters

-DefaultProfile

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

Parameter properties

Type:System.Management.Automation.PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases: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

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Parameter properties

Type:Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.ISubscriptionIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-SubscriptionId

Id of the subscription.

Parameter properties

Type:

System.String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Get
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

Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.ISubscriptionIdentity

Outputs

Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.Api20151101.ISubscription

Notes

COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

INPUTOBJECT <ISubscriptionIdentity>: Identity Parameter

  • [DelegatedProviderId <String>]: Id of the delegated provider.
  • [Id <String>]: Resource identity path
  • [OfferName <String>]: Name of the offer.
  • [SubscriptionId <String>]: Id of the subscription.