Given
below script is helpful to join Azure Active Directory. Pass the parameters in
order to proceed in PowerShell.
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
$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' |