An Azure service that is used to provision Windows and Linux virtual machines.
Hi,
First you need to have DNS servers for the VNet configured so that it points to the domain controller(s).
Second, create the computer account and assign a temporary password to use for joining. To do this you would run below command on domain controller or domain-joined PC:
New-ADComputer -Name "Server02" -AccountPassword (ConvertTo-SecureString -String 'TempJoinPA$$' -AsPlainText -Force)
Third, run below commands on VM:
$joinCred = New-Object pscredential -ArgumentList ([pscustomobject]@{
UserName = $null
Password = (ConvertTo-SecureString -String 'TempJoinPA$$' -AsPlainText -Force)[0]
})
Add-Computer -Domain "domain" -Options UnsecuredJoin,PasswordPass -Credential $joinCred
Above commands are from Add-Computer documentation.
Thanks.
-TP