Skip to content

Instantly share code, notes, and snippets.

@kevinhillinger
Last active November 11, 2019 16:00
Show Gist options
  • Save kevinhillinger/2714c9ee68f9e14263a43c7ed1cacd11 to your computer and use it in GitHub Desktop.
Save kevinhillinger/2714c9ee68f9e14263a43c7ed1cacd11 to your computer and use it in GitHub Desktop.
Create AD Controller
# variables
$location="<selected region>"
$name_suffix="<your student id>"
$group_name="identitylab"
# create the group
New-AzureRmResourceGroup -Name $group_name -Location $location
$template_uri="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/active-directory-new-domain/azuredeploy.json"
# execute the deployment
New-AzResourceGroupDeployment -ResourceGroupName $group_name `
-TemplateUri $template_uri `
-adminUsername "adadmin" `
-adminPassword $(ConvertTo-SecureString "Azuret1workshop!" -AsPlainText -Force) `
-domainName "azureworkshop.io" `
-dnsPrefix $name_suffix
# variables
location=<selected region>
name_suffix="<your student id>"
group_name=identitylab
# create the group
az group create -l $location -n $group_name
template_uri=https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/active-directory-new-domain/azuredeploy.json
# execute the deployment
az group deployment create --resource-group $group_name --name domaincontroller \
--template-uri $template_uri\
--parameters \
adminUsername=adadmin \
adminPassword=Azuret1workshop! \
domainName=azureworkshop.io \
dnsPrefix=$name_suffix
echo "Public FQDN: ${name_suffix}.${location}.cloudapp.azure.com"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment