Hi Guys

For all those who are interested in. The problem described above has been solved with the following changes of code:
code:
 
Previous Code...

$UserObj = $MyOU.Create("user", "CN=TestJK") ;create the new account
IF NOT $UserObj = 0 ;check whether the account has created
? "Object created"
$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
...

I am not sure what the problem actualy caused. I just did change the obj.create statement with the CN= expression and now it works fine. It looks also to me that properties has to change in certain order. However, I just started with ADSI and I am not sure whether my statement is correct or not. Anyway, hope it helps some others who also fight with that problem.

Cheers,
Jörg

Bye the way: Does someone know a good ressource on internet to get detailes about the ADs Objects?