Add-LabAzureSubscription

SYNOPSIS

Adds Azure subscription data to lab

SYNTAX

Add-LabAzureSubscription [[-SubscriptionName] <String>] [-SubscriptionId <Guid>]
 [[-DefaultLocationName] <String>] [[-DefaultStorageAccountName] <String>]
 [[-DefaultResourceGroupName] <String>] [-AutoShutdownTime <TimeSpan>] [-AutoShutdownTimeZone <TimeZoneInfo>]
 [-PassThru] [-AllowBastionHost] [<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

-SubscriptionName

The name of the subscription to select, if necessary

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
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

-DefaultStorageAccountName

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

-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

-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

-AllowBastionHost

Indicates that a Bastion host will be deployed

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
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: TimeZoneInfo
Parameter Sets: (All)
Aliases:

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

-SubscriptionId

Subscription GUID

Type: Guid
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
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