Get-VBOAzureSubscription

In this article

    Short Description

    Returns Microsoft Azure subscriptions associated with a user account that will be used to access Azure Blob storage.

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • Get a subscription by the Microsoft Azure service account and the subscription name.

    Get-VBOAzureSubscription -ServiceAccount <VBOAzureServiceAccount> [-Name <string>]  [<CommonParameters>]

    • Get a subscription by the Microsoft Azure service account and the subscription ID.

    Get-VBOAzureSubscription -ServiceAccount <VBOAzureServiceAccount> -Id <string>  [<CommonParameters>]

    Detailed Description

    This cmdlet returns an array of subscriptions associated with a user account that will be used to access Azure Blob storage.

    Parameters

    Parameter

    Description

    Type

    Required

    Position

    Accept Pipeline Input

    Accept Wildcard Characters

    ServiceAccount

    Specifies a Microsoft Azure service account. The cmdlet will return an array of subscriptions added to this service account.

    Accepts the VBOAzureServiceAccount object.

    To get this object, run the Get-VBOAzureServiceAccount cmdlet.

    True

    Named

    True (ByValue)

    False

    Id

    Specifies a subscription ID. The cmdlet will return a subscription with this ID.

    String

    True

    Named

    False

    False

    Name

    Specifies a subscription name. The cmdlet will return a subscription with this name.

    String

    False

    Named

    False

    False

    <CommonParameters>

    This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

    Output Object

    The cmdlet returns the VBOAzureSubscription object that contains details on subscriptions associated with a user account that will be used to access Azure Blob storage.

    Examples

    Get-VBOAzureSubscriptionExample 1. Getting Microsoft Azure Subscription by Subscription Name

    This example shows how to get a Microsoft Azure subscription by the subscription name.

    $azureacc = Get-VBOAzureServiceAccount -Id f8e5ac3d-d883-4dd8-8de3-a8f315fb6ae2

    Get-VBOAzureSubscription -ServiceAccount $azureacc -Name "SubscriptionName"

    Perform the following steps:

    1. Run the Get-VBOAzureServiceAccount cmdlet. Specify the Id parameter value. Save the result to the $azureacc variable.
    2. Run the Get-VBOAzureSubscription cmdlet. Set the $azureacc variable as the ServiceAccount parameter value. Specify the Name parameter value.

    Get-VBOAzureSubscriptionExample 2. Getting Microsoft Azure Subscription by ID

    This example shows how to get a Microsoft Azure subscription by ID.

    $azureacc = Get-VBOAzureServiceAccount -Id f8e5ac3d-d883-4dd8-8de3-a8f315fb6ae2

    Get-VBOAzureSubscription -ServiceAccount $azureacc -Id "06b7354e-518f-4a10-b4c1-98f49d743012"

    Perform the following steps:

    1. Run the Get-VBOAzureServiceAccount cmdlet. Specify the Id parameter value. Save the result to the $azureacc variable.
    2. Run the Get-VBOAzureSubscription cmdlet. Set the $azureacc variable as the ServiceAccount parameter value. Specify the Id parameter value.

    Related Commands

    Get-VBOAzureServiceAccount