Hi Alex

Thanks for response. The code for the script is almost the same as in the sample above. Below you'll find the full code:
code:
 
$MyOU = getobject("LDAP://OU=TestJK,DC=area,DC=company,DC=com")

IF NOT $MyOU = 0 ;check the connection

$UserObj = $MyOU.Create("user", "TestJK") ;create the new account
IF NOT $UserObj = 0 ;check whether the account has created
$UserObj.CN = "TestJK"
$UserObj.SamAccountName = "TestJK"
$UserObj.UPN = "TestJK@gmaare.migros.com"
$UserObj.Password = "TestJK"
$UserObj.SetInfo ;save the changes
? @ERROR
? @SERROR
? $UserObj.CN
ELSE
? @ERROR
? @SERROR
ENDIF

ELSE
? @ERROR
? @SERROR

ENDIF

I am testing on XP Workstation and I am logged in as Domain Administratior. When I try to do the same with the WinNT:// provider, I get the user created, however, just on the local machine. I guess that there must be a security problem with LDAP:// so I am not sure whether I have to provide a separat user and password. Thanks for your help.

Cheers,
Jörg