AzureStack-QuickStart-Templ.../vmaccess-ext-win
Deepa Thomas 5c01ac5546 Adding 2 templates that use managed disks and updating the updated date (#399) 2018-11-07 10:45:44 -08:00
..
README.md Updating to Development Kit references (#268) 2017-07-31 11:36:49 -07:00
azuredeploy.json Update QuickStartTemplates to add apiprofile 1 (#392) 2018-11-01 16:04:55 -07:00
azuredeploy.parameters.json Fixes from CR feedback 2016-08-05 13:30:08 -07:00
metadata.json Adding 2 templates that use managed disks and updating the updated date (#399) 2018-11-07 10:45:44 -08:00

README.md

A template that deploys the VM access agent extension to an existing Windows VM to create a new user account on the VM or update the password of an existing user.

Prerequisites

This template requires an existing Windows VM

Parameters

  • vmName: Name of an existing Windows VM to update.
  • userName: Username of a new or existing user.
  • password: Password for the new or existing user.

Deployment steps

  1. Deploy to azure stack portal using custom deployment.
  2. Deploy through Visual Studio using azuredeploy.json and azuredeploy.parameters.json
  3. Deploy the solution from PowerShell with the following PowerShell script
## Specify your AzureAD Tenant in a variable. 
# If you know the prefix of your <prefix>.onmicrosoft.com AzureAD account use option 1)
# If you do not know the prefix of your <prefix>.onmicrosoft.com AzureAD account use option 2)

# Option 1) If you know the prefix of your <prefix>.onmicrosoft.com AzureAD namespace.
# You need to set that in the $AadTenantId varibale (e.g. contoso.onmicrosoft.com).
    $AadTenantId = "contoso"

# Option 2) If you don't know the prefix of your AzureAD namespace, run the following cmdlets. 
# Validate with the Azure AD credentials you also use to sign in as a tenant to Microsoft Azure Stack Development Kit.
    $AadTenant = Login-AzureRmAccount
    $AadTenantId = $AadTenant.Context.Tenant.TenantId

## Configure the environment with the Add-AzureRmEnvironment cmdlt
    Add-AzureRmEnvironment -Name 'Azure Stack' `
        -ActiveDirectoryEndpoint ("https://login.windows.net/$AadTenantId/") `
        -ActiveDirectoryServiceEndpointResourceId "https://azurestack.local-api/"`
        -ResourceManagerEndpoint ("https://api.azurestack.local/") `
        -GalleryEndpoint ("https://gallery.azurestack.local/") `
        -GraphEndpoint "https://graph.windows.net/"

## Authenticate a user to the environment (you will be prompted during authentication)
    $privateEnv = Get-AzureRmEnvironment 'Azure Stack'
    $privateAzure = Add-AzureRmAccount -Environment $privateEnv -Verbose
    Select-AzureRmProfile -Profile $privateAzure

## Select an existing subscription where the deployment will take place
    Get-AzureRmSubscription -SubscriptionName "SUBSCRIPTION_NAME"  | Select-AzureRmSubscription

# Set Deployment Variables
$myNum = "001" #Modify this per deployment
$RGName = "myRG$myNum"
$myLocation = "local"

$templateFile= "azuredeploy.json"
$templateParameterFile= "azuredeploy.parameters.json"

# Create Resource Group for Template Deployment
New-AzureRmResourceGroup -Name $RGName -Location $myLocation

# Deploy Template 
New-AzureRmResourceGroupDeployment `
    -ResourceGroupName $RGName `
    -TemplateFile $templateFile `
	-TemplateParameterFile $templateParameterFile