Yeah, HoneyDo is keeping me on and off today as well. Just to keep things simple, here's a script that displays the current set of allowed wkstns, then assigns three new random wkstn names:
break on
srnd((-1)*@ticks)
$domain = "@LDOMAIN"
$userid = "@UserID"
$user = getobject("WinNT://$domain/$userid,user")
if not $user
?"No user info for $user"
quit(1)
endif
?"List old workstations ..."
For each $WkStn in $User.LoginWorkstations
? $WkStn
Next
?"Hit return to assign new workstations..." gets$
$user.loginworkstations = "wkstn"+rnd(100),"wkstn2"+rnd(100),"wkstn3"+rnd(100)
$user.setinfo
?"List new workstations ..."
For each $WkStn in $User.LoginWorkstations
? $WkStn
Next
exit 1
The output I get is this:
F:\>kix32 test
List old workstations ...
wkstn57
wkstn220
wkstn382
Hit return to assign new workstations...
List new workstations ...
wkstn1
wkstn250
wkstn332
F:\>kix32 test
List old workstations ...
wkstn1
wkstn250
wkstn332
Hit return to assign new workstations...
List new workstations ...
wkstn46
wkstn214
wkstn365
F:\>
Does this work for you ?
-Shawn