I have a working script that creates multiple computer accounts in an AD domain.
$OU='OU=compOU,DC=domain,DC=local'
Import-Csv c:\NewComputers.csv | ForEach-Object { New-ADComputer -name $_.computeraccount -samaccountname $_.samaccountname -Path $OU -Enabled $True }
I would like to build on this script by specifying a certain user account to be able to join each new computer to the domain from the computer side. Not sure how to proceed.
Thx