Get-MsolSubscription

Gets subscriptions.

Syntax

Get-MsolSubscription
   [-TenantId <Guid>]
   [<CommonParameters>]
Get-MsolSubscription
   -SubscriptionId <Guid>
   [-TenantId <Guid>]
   [<CommonParameters>]

Description

The Get-MsolSubscription cmdlet gets all the subscriptions that the company has purchased. When assigning licenses to users, the Get-MsolAccountSku cmdlet should be used instead.

Examples

Example 1: Gets a list of company subscriptions

PS C:\> Get-MsolSubscription

This command gets a list of company subscriptions. For license assignment, the Get-MsolAccountSku cmdlet should be used instead.

Required Parameters

-SubscriptionId

Specifies the unique object ID of the subscription to retrieve.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-TenantId

Specifies the unique ID of the tenant on which to perform the operation. The default value is the tenant of the current user. This parameter applies only to partner users.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

Microsoft.Online.Administration.Subscription

This cmdlet returns subscription objects that contain the following information:

  • DateCreated. The date that this subscription was created.

  • NextLifecycleDate. The date of the next lifecycle event for this subscription.

  • ObjectId. The unique ID of this subscription.

  • OcpSubscriptionId. The ID of this subscription in the commerce system.

  • ServiceStatus. The provisioning status of each service associated with this subscription.

  • SkuId. The object ID of the SKU associated with this subscription.

  • SkuPartNumber. The SKU associated with this subscription.

  • Status. The status of this subscription (Enabled, Expired, or Suspended).

  • TotalLicenses. The number of seats included in this subscription.