Quote:

$AdsUser.UserAccountControl("NewUserAccountControl", +H200, +h10000)




Again this is wrong. Please read the "expressions" section of the manual for proper hex notation.

&200, &10000


See: http://support.microsoft.com/default.aspx?scid=kb;en-us;305144

Code:

usr.Put ("userAccountControl", (&200 | &10000))
? @serror



or

Code:

usr.userAccountControl = (&200 | &10000))
? @serror



Until you fully understand ADSI methods, I would suggest checking the @error and @serror macros after setting each property.
_________________________
Home page: http://www.kixhelp.com/hb/