Add-LabAzureSubscription

SYNOPSIS

Adds Azure subscription data to lab

SYNTAX

ByName (Default)

Add-LabAzureSubscription [[-SubscriptionName] <String>] [-Environment <String>]
 [[-DefaultLocationName] <String>] [[-DefaultStorageAccountName] <String>]
 [[-DefaultResourceGroupName] <String>] [-AutoShutdownTime <TimeSpan>] [-AutoShutdownTimeZone <String>]
 [-PassThru] [-AllowBastionHost] [-AzureStack] [<CommonParameters>]

ById

Add-LabAzureSubscription [-SubscriptionId <Guid>] [-Environment <String>] [[-DefaultLocationName] <String>]
 [[-DefaultStorageAccountName] <String>] [[-DefaultResourceGroupName] <String>] [-AutoShutdownTime <TimeSpan>]
 [-AutoShutdownTimeZone <String>] [-PassThru] [-AllowBastionHost] [-AzureStack] [<CommonParameters>]

DESCRIPTION

The cmdlet adds the Azure subscription data from an Azure RM profile generated by Save-AzureRmContext to the lab definition, creates or selects the default resource group, default location and default storage account. It caches the possible VM sizes and installation offers/skus for the selected location. The location can either be pre-selected or auto-generated based on response time.

EXAMPLES

Example 1

$labName = 'myAzureLab'
$azureDefaultLocation = 'East US'
Add-LabAzureSubscription -SubscriptionName JHPaaS -DefaultLocationName $azureDefaultLocation

Adds the subscription JHPaaS and creates a lab resource group $labname in the default location

PARAMETERS

-AllowBastionHost

Indicates that a Bastion host will be deployed

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-AutoShutdownTime

Time that machines will be shut down

Type: TimeSpan
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AutoShutdownTimeZone

Time zone for shutdown time. Defaults to current system timezone

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureStack

Indicates that the endpoint is running Azure Stack Hub with its considerably older API versions.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultLocationName

The default location to choose

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultResourceGroupName

The default resource group to choose

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageAccountName

OBSOLETE PARAMETER WHICH WILL BE IGNORED The default storage account to choose

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Environment

Azure environment to use. Defaults to AzureGlobal. Intended use: Adding a connected Azure Stack environment. Theoretically possible but untested: Other environments like AzureChina.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru

Returns the lab's subscription

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-SubscriptionId

Subscription GUID

Type: Guid
Parameter Sets: ById
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubscriptionName

The name of the subscription to select, if necessary

Type: String
Parameter Sets: ByName
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Author: Jan-Hendrik Peters