Add-LabAzureSubscription

SYNOPSIS

Adds Azure subscription data to lab

SYNTAX

Add-LabAzureSubscription [[-SubscriptionName] <String>] [[-DefaultLocationName] <String>]
 [[-DefaultStorageAccountName] <String>] [[-DefaultResourceGroupName] <String>] [-PassThru]

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'
$azurePublishingFile = 'C:\MyExportedProfile'
$azureDefaultLocation = 'East US'
Add-LabAzureSubscription -Path $azurePublishingFile -DefaultLocationName $azureDefaultLocation

Adds the subscription selected in the exported profile 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: None
Accept pipeline input: False
Accept wildcard characters: False

INPUTS

OUTPUTS

NOTES

Author: Jan-Hendrik Peters