Quote:

$objUser.Put "sAMAccountName", $user

Is VBS syntax. The original code is correct for KiXtart



Right you are . I guess it shows that I never quite got around to converting my working adduser VB scripts to KiX. Sorry!

I was drawn to that line because it does appear that the sAMAccountName is not being set. Jens' suggestion to try a .SetInfo after the .Put is certainly worth trying, but it isn't required there in my VB scripts, which do produce the correct results on Windows Server 2000, so I'm unsure if it will help (can't hurt, though!).

What is the format for $user? I understand some people have problems if there is a space in samAccountName (which is being set to $user), though others say it seems to work fine or that you may need to enclose it in quotes and then it should work.

However, I should have read the original problem more carefully. Shane also mentions "the domain drop down just to the right of that has nothing selected", which is because UserPrincipalName is not being set. See the example posted by Peter.

Joe