I still have no idea why script below doesn't join computer to domain... It just exits with return code 0... Rename works fine.. Been strugling with this issue for whole week now ;(
;Constants
Const $JOIN_DOMAIN = 1
Const $ACCT_CREATE = 2
Dim $sCmpName
Dim $sUser, $sPassword, $sDomain, $sOU
;User / Domain Data
$sUser = "deploy"
$sPassword = "xxxxx"
$sDomain = "DOMAIN"
$sOU = "<ou=Computers,dc=DOMAIN,dc=com>";<ou=myou,dc=mydomain,dc=com>
;Input new Computer Name
$sCmpName = I