Azure - VNet-2-VNet Connectivity Using PowerShell Script

The purpose of this script is to create two Azure Virtual Networks in different Azure regions and then make connectivity between them. PowerShell script will create Virtual Networks, Define Virtual Gateways, Virtual Networks Connections and connectivity between them.




DevOps is not a product to install

It is very important to realize that DevOps is not a product.  You cannot buy DevOps and install it. Thanks to Donovan for clarification. Microsoft Visual Studio is powerful and Complete DevOps Solution.

I tried to sketch diagram and simple definitions of DevOps practices.

Continuous Integration: is basically code merging into Source Control e.g (could be on Prem/Off Prem Microsoft Tools/Services) to make sure upcoming changes with other changes.

Continuous Delivery: is to continuous propagation of code changes on (Test, Pre Production/Staging OR Production).


Continuous Deployment: is code deployment on Production as soon as its ready rather than waiting for other changes and releases.


Build Domain Controller with AD Tenant in 60 minutes - Azure

 “Infrastructure as code” true power of Microsoft Azure Cloud. Here I sketched a single file use to Install a domain controller in Microsoft Azure with provision of an Azure AD Tenant. You need to define all parameters first. All AD Groups, AD Test users, AD Members and AD OUs are present in attached .csv files. I passed the example parameters in script. Script will do following in sequence shown below based on your parameters
·        Storage Account
·        Virtual Network and Subnet
·        Cloud Service
·        Virtual Machine
·        Domain and Tenant

Since i am in New Zealand so, i mentioned my closest Microsoft data center location "Australia East" in script everywhere. Place all files in one folder for example in my case all files residing at location in folder C:\DC\
DC is folder name here, all files with given below names are attached
--------------------------------------------------------------------------------------
File to create domain controller: DomainController.ps1
File to create VNet and Subnet: CreateVNetSubNet.xml
File to create AD Groups: AD_Groups.csv
File to create AD members: AD_Members.csv
File to create AD OUs: AD_OUs.csv
File to create AD Users: AD_Users.csv
--------------------------------------------------------------------------------------

Click here to download all files.


Here are steps to execute scrip with mentioned files.

1. Open PowerShell ISE with Administrator Account 
2. Add-Azure Account as shown below




3. Pass Azure Account Credentials in prompt window





4. Run command Get-AzureSubscription in order to see subscription is valid or not



5. Select the DomainController.ps1 from location C:\DC\ and open in PowerShell


  



6. Run the script and it will look like below, note script is start executing in sequence



7. Here you can see the progress






8. After completion of above following will be created



9. Click on VM i.e "MyTestVMforAD"






10. Press "Connect" to take session




11. After log-in, go to server administrative tools and click "Active Directory Users and Computers"




12. WOW, domain controller has been provisioned and users imported :)