; SCRIPT AUTOMATIZADO PARA CRIACAO DE USUARIOS NO ACTIVE DIRECTORY
FOR /F "EOL=; TOKENS=1,2,* DELIMS=," %%I IN (ENGENHEIROS.TXT) DO DSADD USER "CN=%%J %%I,OU=USERS,OU=BH,DC=CONTOSO,DC=LOCAL" -SAMID %%K -UPN %%K@CONTOSO.LOCAL -FN %%J -LN %%I -DISPLAY "%%J %%I" -PWD password.1 -DISABLED YES
FOR /F "EOL=; TOKENS=1,2,* DELIMS=," %%I IN (FINANCEIRO.TXT) DO DSADD USER "CN=%%J %%I,OU=USERS,OU=BH,DC=CONTOSO,DC=LOCAL" -SAMID %%K -UPN %%K@CONTOSO.LOCAL -FN %%J -LN %%I -DISPLAY "%%J %%I" -PWD password.1 -DISABLED YES
FOR /F "EOL=; TOKENS=1,2,* DELIMS=," %%I IN (PRODUCAO.TXT) DO DSADD USER "CN=%%J %%I,OU=USERS,OU=BH,DC=CONTOSO,DC=LOCAL" -SAMID %%K -UPN %%K@CONTOSO.LOCAL -FN %%J -LN %%I -DISPLAY "%%J %%I" -PWD password.1 -DISABLED YES
FOR /F "EOL=; TOKENS=1,2,* DELIMS=," %%I IN (PROJETOS.TXT) DO DSADD USER "CN=%%J %%I,OU=USERS,OU=BH,DC=CONTOSO,DC=LOCAL" -SAMID %%K -UPN %%K@CONTOSO.LOCAL -FN %%J -LN %%I -DISPLAY "%%J %%I" -PWD password.1 -DISABLED YES
FOR /F "EOL=; TOKENS=1,2,* DELIMS=," %%I IN (RH.TXT) DO DSADD USER "CN=%%J %%I,OU=USERS,OU=BH,DC=CONTOSO,DC=LOCAL" -SAMID %%K -UPN %%K@CONTOSO.LOCAL -FN %%J -LN %%I -DISPLAY "%%J %%I" -PWD password.1 -DISABLED YES
FOR /F "EOL=; TOKENS=1,2,* DELIMS=," %%I IN (TECNOLOGIA.TXT) DO DSADD USER "CN=%%J %%I,OU=USERS,OU=BH,DC=CONTOSO,DC=LOCAL" -SAMID %%K -UPN %%K@CONTOSO.LOCAL -FN %%J -LN %%I -DISPLAY "%%J %%I" -PWD password.1 -DISABLED YES