Code Monkey home page Code Monkey logo

azureautomation / automated-active-directory-test-domain-deployment-runbook Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 3.0 37 KB

This runbook automates the provisioning of a new AD domain/forest in Microsoft Azure for testing purposes. Given an Azure subscription and an account that has access, the runbook creates a new cloud service and virtual machine along with a new storage account and virtual network.

License: Other

PowerShell 100.00%
azureautomationrunbookgallery

automated-active-directory-test-domain-deployment-runbook's Introduction

Automated Active Directory Test Domain Deployment Runbook

What it Does

This runbook automates the provisioning of a new AD domain/forest in Microsoft Azure for testing purposes. Given an Azure subscription and an account that has access, the runbook creates a new cloud service and virtual machine along with a new storage account and virtual network. The resource names are generated automatically based upon the specified domain name e.g. 'mydomain.local'. Once the Azure resources are created and the VM is provisioned, the runbook connects to the VM remotely via WinRM to the PowerShell endpoint, installs Active Directory and promotes to a new domain controller.

 

Note: Videos and additional details about this runbook available here: Automated Active Directory Test Domain Deployment in Microsoft Azure

Image

When to Use

Using this runbook, you can quickly provision a test lab domain in Azure with a few clicks, avoiding the time and tedium of setting up all of the components necessary to create a new working environment. Because a new virtual network is created, you can then add additional servers to the domain by simply creating them into the associated member subnet. And because the resources are isolated, you can later remove the environment without affecting the other resources in your subscription.

Warning: Do not use this runbook if manually installing Active Directory domains if one of your favorite things in life.

How it Works

Once imported and published into an Azure Automation account in your subscription, you can click “Run”, enter a few parameter values, and come back in 20 minutes to a fully-provisioned new domain.

The runbook performs the following:

  • Authenticates to subscription

  • Creates dedicated cloud service

  • Creates dedicated storage account

  • Saves a backup of the subscription virtual network configuration to the storage account

  • Creates a dedicated virtual network

  • Creates a new virtual machine for the domain controller

  • Installs Active Directory on the VM

  • Restarts the VM

  • Gives you warm fuzzies

By default, the runbook looks for an Azure Automation credential asset that defines the username and password for the account used to connect to the Azure subscription in which the resources will be created. The subscription name is by default provided by a Variable asset/setting. You can also specify these per-execution in lieu of creating the default settings.

When the runbook completes, a new VM is created with the specified name with AD and DNS installed. You can then connect using RDP as normal. Adding additional members to the domain can be done by creating them as VMs in the same virtual network within the 'Member-Subnet' subnet.

Acknowledgements

Thanks to Ian Farr and his example script from which the network creation portion in particular is drawn upon in this runbook.

Runbook Content

 

 

TechNet gallery is retiring! This script was migrated from TechNet script center to GitHub by Microsoft Azure Automation product group. All the Script Center fields like Rating, RatingCount and DownloadCount have been carried over to Github as-is for the migrated scripts only. Note : The Script Center fields will not be applicable for the new repositories created in Github & hence those fields will not show up for new Github repositories.

automated-active-directory-test-domain-deployment-runbook's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

0-1-2-3-4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.