When you use the NET USER command, the /workstations: switch is limited to defining 8 workstation that a user can log on to.

When you use the DSADD USER or DSMOD USER Active Directory command-line tool, the ability to set the userWorkstations attribute is NOT included.

I have scripted userWorkstations.bat to allow you to set more that 8 workstations into a user's userWorkstations attribute.

The syntax for using userWorkstations.bat is:

userWorkstations UserDN LogonTo UWOK

Where:

<b>UserDN</b>   is the Distinguished Name of the user you wish to maintain.

<b>LogonTo</b>  is a sting of <b>NetBIOS</b> computer names, separated by commas, that you wish to allow the user to logging on to.

<b>UWOK</b>     is a <a href="/article/jsifaq/jsi-tip-5535-how-can-i-cause-a-called-batch-file-to-return-a-call-directed-environment-variable-.aspx">call directed environment variable</a> that will contain a
         <b>Y</b> if the maintenance was successful, or an <b>N</b> if the maintenance failed.
NOTE: userWorkstations.bat use AdMod.exe, which must be located in a folder that is in your PATH.

NOTE: I don't know what the absolute maximum number of workstations that you can configure is, but I gave up testing after reaching a large number.

userWorkstations.bat contains:

@echo off
if \{%3\}==\{\} @echo userWorkstations UserDN LogonTo UWOK&goto :EOF
setlocal
set UWOK=N
set userDN=%1
set LogonTo=%2
set LogonTo=%LogonTo:"=%
call :quiet>nul 2>&1
endlocal&set %3=%UWOK%
goto :EOF
:quiet
<font size="1">for /f "Tokens=*" %%a in ('admod -b %userDN%  "userWorkstations:-"^|Find "The command completed successfully"') do (</font>
 set UWOK=Y
)
if "%UWOK%" EQU "N" goto :EOF
set UWOK=N
<font size="1">for /f "Tokens=*" %%a in ('admod -b %userDN%  "userWorkstations:+:%LogonTo%"^|Find "The command completed successfully"') do (</font>
 set UWOK=Y
)