Hi there,

I have spent hours trying to work out where I am going wrong here. I have searched the bulletin board and my code looks right but I still cant get it to work! All I want to do is add a user to the NEW OU off the root of AD. Here's the code:

Code:
 
CLS
Break ON
$adsOU = GetObject("LDAP://OU=New,dc=domain,dc=com")
If @ERROR<>0
? @SERROR + " (" + @ERROR + ")"
Quit 1
EndIf

$adsUser = $adsOU.Create("user","cn=Test account34")
$adsOU.SetInfo



It doesn't flag up any errors

Thanks in advance for any help / suggestions

Glenn.