dsadd ou "ou=usuaris,dc=asix,dc=local" for /L %%x in (1,1,10) do ( dsadd user "cn=alumnA%%x,ou=usuaris,dc=asix,dc=local" -memberof "cn=EQUIPA,dc=asix,dc=local" -pwd "P@$$w0rd" -mustchpwd "yes" dsadd user "cn=alumnB%%x,ou=usuaris,dc=asix,dc=local" -memberof "cn=EQUIPB,dc=asix,dc=local" -pwd "P@$$w0rd" -mustchpwd "yes" dsadd user "cn=alumnC%%x,ou=usuaris,dc=asix,dc=local" -memberof "cn=EQUIPC,dc=asix,dc=local" -pwd "P@$$w0rd" -mustchpwd "yes" ) Pause