How to Join Active Directory in Azure

Given below script is helpful to join Azure Active Directory. Pass the parameters in order to proceed in PowerShell.




$Password = " GiveYourPassword"
$Domain = “tariqyounas.net”
$DomainPassword=”GiveYourPassword”
$JoinDomain=”Put your Joining Domain”
Add-AzureProvisioningConfig -WindowsDomain `
-Password $Password `
-Domain $Domain `
-DomainPassword $DomainPassword `
-DomainUserName 'Administrator' `
-JoinDomain $ JoinDomain `
You can define here optionally, specify an OU for the machine using the parameter:
-MachineObjectOU 'OU=AzureVMs,DC=TARIQYOUNAS,DC=net'
view raw ADJoin.ps1 hosted with ❤ by GitHub