Last active
November 11, 2019 16:00
-
-
Save kevinhillinger/2714c9ee68f9e14263a43c7ed1cacd11 to your computer and use it in GitHub Desktop.
Create AD Controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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