AzureStack-QuickStart-Templ.../ad-join-domain-ext-win
Wei Luo 45a0601401 Update AD related templates to use Managed Disk for VMs. (#458)
* Add quick deployment template for singlae ADDS DC.

* Correct API verion error.

* Remove AvailabilitySet.SKU property.

* Set availabilityset fault domain to 2, update domain to 5.

* update the VM managed disk storage account type.

* Test managed disk in template

* Update availability set sku to Aligned as managed.

* update availabilitySets API version to 2017-12-01 to support sku "Aligned".

* Update VM size to Standard_DS2_v2.

* Test managed disk in VM.

* Modify managed disk properties.

*                             "storageAccountType": "StandardSSD_LRS"

* test VM API version

* correct VM API version to 2017-12-01

* update the API version for all components.

* Update Readme.md. Singale DC deployment is successful.

* Update vnet DNS to AD DC IP.

* Wellsluo dev (#2)

* Start to update ad domain HA templates to Managed Disk.  Update api version.

* Update the VM disk to managed disk. Remove creation the storage account.

* update templates link

* update templates link with correct _artifactsLocation uri

* change data disk size to 20GB.

* update 2nd DC dependson.

* Change BDC name to adBDC02 since AzS report error when creating disk with name adBDC.

* Update VirtualNetwork in vnet.json API version to 2017-10-01.

* Remove chagne of adBDC name.

* Update metadata.json with latest info.

* update metadata.json with updated information.

* Update apiVersion to 2017-10-01.

* update apiVersion to 2017-10-01.

* Update apiVersion to 2017-10-01.

* update apiVersion to 2017-12-01.

* Update to use managed disk when deploying VM.

* Update the VM naming convention.

* Update the DSC file to add the DSN forwarder to AzureStack virtual DNS, in order to resolve external DNS names, like site in Internet.  Get the  xDnsServer DSC module from https://github.com/PowerShell/xDnsServer, latest released version 1.13.0.0.

* Update the "Known issue" part. Add issue of external FQDN name resolving.

* Correct the error to compose the vmName.

* Update change and known issue.

* For VM with managed disk deployment template, refer to "active-directory-new-domain".

* Update readme.md with changes. Rename original template file to azuredeploy-unmanagedDisk.json

* Update deployment Uri to master branch.
2019-12-03 11:23:06 -08:00
..
README.md Update AD related templates to use Managed Disk for VMs. (#458) 2019-12-03 11:23:06 -08:00
azuredeploy-unmanagedDisk.json Update AD related templates to use Managed Disk for VMs. (#458) 2019-12-03 11:23:06 -08:00
azuredeploy.json Update AD related templates to use Managed Disk for VMs. (#458) 2019-12-03 11:23:06 -08:00
azuredeploy.parameters.json AD join domain parameters file fix 2016-08-19 12:24:44 -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 creates a simple Windows VM and joins it to an existing domain using VM extension

Changes

Updates in 2019-11:
    - Update VM name convention. 
    - Update VM with managed disk. 
    - Rename original template to azuredeploy-unmanagedDisk.json.

Prerequisites

  1. Template requires a pre-existing domain to join.A domain controller can be deployed using the template located at: https://github.com/Azure/AzureStack-QuickStart-Templates/tree/master/ad-non-ha
  2. The template asumes that the VM to be created will be connected to a subnet that can access the target domain controller

Parameters

  • vmName: Name of the Virtual Machine to be created.
  • adminUsername: Username for the Virtual Machine local administrator.
  • adminPassword: Password for the Virtual Machine local administrator.
  • dcVNetName: Name of the extisting VNet that contains the domain controller
  • dcSubnetName: Name of the existing subnet that contains the domain controller
  • domainToJoin: FQDN of the AD domain to join
  • ouToJoin: Specifies an AD organizational unit (OU) for the computer to join. Enter the full distinguished name of the OU in quotation marks. Example: 'OU=testOU; DC=domain; DC=Domain; DC=com'. This value can be empty
  • domainJoinOptions: Set of bit flags that define the join options. Default value of 3 is a combination of NETSETUP_JOIN_DOMAIN (0x00000001) & NETSETUP_ACCT_CREATE (0x00000002) i.e. will join the domain and create the account on the domain. For more information see https://msdn.microsoft.com/en-us/library/aa392154(v=vs.85).aspx
  • domainUserName: Username of the domain account to be used for joining the domain
  • domainPassword: Password of the domain account to be used for joining the domain

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