About this OpenDSObject stuff, yeah, the WinNT provider does support that. In fact, I just ran this script (from a Domain User Account), that TOGGLES the disabled on/off for a given user:
break on
$dso = GetObject("WinNT:")
$user = $dso.OpenDSObject("WinNT://@LDOMAIN/SHAWN.TEST,USER", "shawn.tassie", "password" , 0)
?"disabled=" $user.accountdisabled
$user.accountdisabled = $user.accountdisabled = 0
$user.setinfo
?"disabled=" $user.accountdisabled
exit 1
The output from that was:
M:\>kix32 t
disabled=0
disabled=-1
0
The operation completed successfully.
M:\>
Run a second time:
M:\>kix32 t
disabled=-1
disabled=0
0
The operation completed successfully.
M:\>
Now, the machine I ran this on was joined to the domain in question, could this be a diff ? Because if memory serves, there are issues when crossing domain boundaries - may this be the problem. I think Bryce has researched this issue throughly (ie, invested much time in getting it to work), would be nice to get some thoughts from da-man.
[ 14 June 2002, 18:08: Message edited by: Shawn ]