es un archivo bat que coge la info de un csv
(solo me falla la creacion de usuarios)
*******************************************************************
ARCHIVO BAT
Código
@echo off rem CREACIÓN DE OU'S dsadd ou ou=OUCLIVET3,dc=CLIVETRJO,dc=cat dsadd ou ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=cat dsadd ou ou=Recepcionista,ou=OUCLIVET3,dc=CLIVETRJO,dc=cat dsadd ou ou=Auxiliar,ou=OUCLIVET3,dc=CLIVETRJO,dc=cat dsadd ou ou=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=cat rem CREAR GRUPOS LOCALES DE VETERINARI,RECEPCIO,AUXILIAR dsadd group "cn=G_Veterinari,ou=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=cat" -scope l dsadd group "cn=G_Recepcionista,ou=Recepcionista,ou=OUCLIVET3,dc=CLIVETRJO,dc=cat" -scope l dsadd group "cn=G_Auxiliar,ou=Auxiliar,ou=OUCLIVET3,dc=CLIVETRJO,dc=cat" -scope l rem CREAR GRUPOS GLOBALES VETERINARI dsadd group cn=Oftalmologia,ou=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT -memberof "cn=G_Veterinari,u=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT" dsadd group cn=Dermatologia,ou=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT -memberof "cn=G_Veterinari,u=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT" dsadd group cn=Cardiologia,ou=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT -memberof "cn=G_Veterinari,u=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT" dsadd group cn=General,ou=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT -memberof "cn=G_Veterinari,u=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT" dsadd group cn=Traumatologia,ou=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT -memberof "cn=G_Veterinari,u=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT" dsadd group cn=Gat,ou=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT -memberof "cn=G_Veterinari,u=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT" dsadd group cn=Gos,ou=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT -memberof "cn=G_Veterinari,u=OU_General,ou=Veterinari,ou=OUCLIVET3,dc=CLIVETRJO,dc=CAT" [b]REM Creacion usuarios FOR /F "EOL=, skip=1 TOKENS=1,2,3,4,5,6,7,8,9,10,11,12 delims=;" %%a in (G:\CLIVet3.csv) do dsadd user "cn=%%a %%b, ou=%%l, ou=%%k, ou=OUCLIVET3, dc=CLIVETJCR, dc=cat" -samid "%%aS" -pwd "%%d" -upn "%%j" -fn "%%a" -ln "%%b" -tel "%%c"-display "%%a %%b" -disabled no -memberof "cn=%%e %%f %%g %%h %%i, ou=%%l, ou=%%k, ou=OUCLIVET3, dc=CLIVETJCR, dc=cat" -hmdrv P: -hmdir \\J23AJOADSRV\DADESCLIVET\%%b pause[/b]
ARCHIVO CSV
Código:
Pol,Sanchez,636447755,asdASD123,Gat,Oftalmologia,,General,Veterinari,Pol_Sanchez@Clivetjcr.cat,Veterinari,OU_General
Adrian,Sanchez,636998866,asdASD123,Gos,General,,General,Veterinari,Adrian_Sanchez@Clivetjcr.cat,Veterinari,OU_General
Raul,Sanchez,636636363,asdASD123,Gos,Traumatologia,,General,Veterinari,Raul_Sanchez@Clivetjcr.cat,Veterinari,OU_General
Xavier,Sanchez,636224411,asdASD123,,,,,Recepcionista,Xavier_Sanchez@Clivetjcr.cat,Recepcio,
Albert,Sanchez,636635263,asdASD123,,,,,Auxiliar,Albert_Sanchez@Clivetjcr.cat,Auxiliar,
Francesc,Sanchez,636859685,asdASD123,,,,,Recepcionista,Francesc_Sanchez@Clivetjcr.cat,Recepcio,
Joan,Sanchez,636991155,asdASD123,,,,,Auxiliar,Joan_Sanchez@Clivetjcr.cat,Auxiliar,
Christian,Sanchez,636748552,asdASD123,,,,,Recepcionista,Christian_Sanchez@Clivetjcr.cat,Recepcio,
Ivan,Sanchez,636771144,asdASD123,,,,,Auxiliar,Ivan_Sanchez@Clivetjcr.cat,Auxiliar,
David,Sanchez,636663366,asdASD123,,,,,Auxiliar,David_Sanchez@Clivetjcr.cat,Auxiliar,
Joel,Sanchez,636112211,asdASD123,,,,,Auxiliar,Joel_Sanchez@Clivetjcr.cat,Auxiliar,
Victor,Sanchez,6368899988,asdASD123,,,,,Recepcionista,Victor_Sanchez@Clivetjcr.cat,Recepcio,
Pau,Sanchez,636335533,asdASD123,,,,,Auxiliar,Pau_Sanchez@Clivetjcr.cat,Auxiliar,
Carles,Sanchez,636116688,asdASD123,,,,,Recepcionista,Carles_Sanchez@Clivetjcr.cat,Recepcio,
Manel,Sanchez,636895623,asdASD123,,,,,Auxiliar,Manel_Sanchez@Clivetjcr.cat,Auxiliar,
Eric,Sanchez,636234589,asdASD123,,,,,Recepcionista,Eric_Sanchez@Clivetjcr.cat,Recepcio,
Enric,Sanchez,636325498,asdASD123,,,,,Auxiliar,Enric_Sanchez@Clivetjcr.cat,Auxiliar,
Paula,Sanchez,63685296,asdASD123,Gat,Traumatologia,,General,Veterinari,Paula_Sanchez@Clivetjcr.cat,Veterinari,OU_General
Nuria,Sanchez,636451278,asdASD123,,,,,Auxiliar,Nuria_Sanchez@Clivetjcr.cat,Auxiliar,
Anna,Sanchez,636458963,asdASD123,,,,,Auxiliar,Anna_Sanchez@Clivetjcr.cat,Auxiliar,
Marta,Sanchez,636589712,asdASD123,,,,,Auxiliar,Marta_Sanchez@Clivetjcr.cat,Auxiliar,
Maria,Sanchez,636992255,asdASD123,,,,,Auxiliar,Maria_Sanchez@Clivetjcr.cat,Auxiliar,
Sara,Sanchez,636883311,asdASD123,,,,,Recepcionista,Sara_Sanchez@Clivetjcr.cat,Recepcio,
Guillem ,Sanchez,636969696,asdASD123,,,,,Auxiliar,Guillem_Sanchez@Clivetjcr.cat,Auxiliar,
Judit,Sanchez,636223311,asdASD123,,,,,Auxiliar,Judit_Sanchez@Clivetjcr.cat,Auxiliar,
Marc,Sanchez,636332211,asdASD123,,,,,Auxiliar,Marc_Sanchez@Clivetjcr.cat,Auxiliar,
Sergi,Sanchez,636552211,asdASD123,,,,,Recepcionista,Sergi_Sanchez@Clivetjcr.cat,Recepcio,
Eloi,Sanchez,636885566,asdASD123,,,,,Recepcionista,Eloi_Sanchez@Clivetjcr.cat,Recepcio,
Jordi,Sanchez,636998877,asdASD123,,,,,Recepcionista,Jordi_Sanchez@Clivetjcr.cat,Recepcio,
Isabel,Sanchez,636559988,asdASD123,,,,,Auxiliar,Isabel_Sanchez@Clivetjcr.cat,Auxiliar,
Abril,Sanchez,636995566,asdASD123,,,,,Auxiliar,Abril_Sanchez@Clivetjcr.cat,Auxiliar,
Ada,Sanchez,636456789,asdASD123,,,,,Auxiliar,Ada_Sanchez@Clivetjcr.cat,Auxiliar,
Dolors,Sanchez,636123456,asdASD123,,,,,Recepcionista,Dolors_Sanchez@Clivetjcr.cat,Recepcio,
Irene,Sanchez,636988765,asdASD123,,,,,Recepcionista,Irene_Sanchez@Clivetjcr.cat,Recepcio,
Ivet,Sanchez,636778855,asdASD123,Gos,Cardiologia,Oftalmologia,General,Veterinari,Ivet_Sanchez@Clivetjcr.cat,Veterinari,OU_General
Olga,Sanchez,636779923,asdASD123,Gat,Dermatologia,Oftalmologia,General,Veterinari,Olga_Sanchez@Clivetjcr.cat,Veterinari,OU_General
Raquel,Sanchez,636112121,asdASD123,Gat,Oftalmologia,Dermatologia,General,Veterinari,Raquel_Sanchez@Clivetjcr.cat,Veterinari,OU_General
Roser,Sanchez,636852741,asdASD123,Gos,General,,General,Veterinari,Roser_Sanchez@Clivetjcr.cat,Veterinari,OU_General
Barbara,Sanchez,636788978,asdASD123,Gat,Cardiologia,Dermatologia,General,Veterinari,Barbara_Sanchez@Clivetjcr.cat,Veterinari,OU_General
Beth,Sanchez,636564556,asdASD123,Gos,Dermatologia,Traumatologia,General,Veterinari,Beth_Sanchez@Clivetjcr.cat,Veterinari,OU_General
· Los códigos deben ir en etiquetas GeSHi
· No se debe escribir en mayúsculas
>aquí las reglas del foro
-Engel Lex