I have tried % and %% and %! to make the field appear as a variable but with not joy, however if i place %SOME% in it with the var i made above it works, I think it's todo with the qty of % in this field and the next one e.g. %%n but I have no idea on how to wrap it so it's read correctly as a variable.
anyone able to assist me in this cockup ?
heres the code \/
FOR /L %%i IN (1,1,2) DO (
set /a rand=!random!%%5+1
set /a countit=!random!*100/32768+1
set dsrunner=dsmod CN=Supply%%i,OU=%%i,OU=Staff,OU=CSE,DC=WCS,DC=INTERNAL
for %%N in (!rand!) do dsmod user "CN=Supply%%i,OU=Supply,OU=Staff,OU=CSE,DC=WCS,DC=INTERNAL" -pwd %SOME[%n]%