Pour avoir le source sous la forme d'un texte brute, cliquez sur "view plain" en haut a gauche.
adresse_ldap_Ou_cible = "LDAP://OU=Eleves,OU=Profs-Eleves,OU=Utilisateurs,DC=yourcenar,DC=local" '######### On effectue une requête ADO Set objConnexion = Wscript.createObject("ADODB.Connection") Call objConnexion.open ("Provider=ADsDSOObject;") Set objCommande = Wscript.createObject("ADODB.Command") objCommande.activeConnection = objConnexion objCommande.commandText = _ "<" & adresse_ldap_Ou_cible & ">;" & _ "(ObjectCategory=user);" & _ "ADsPath,profilePath;" & _ "subtree" Set objEnregistrement = objCommande.execute '######### On effectue les modifications que l'on souhaite Do Until objEnregistrement.EOF ADsPath = objEnregistrement.fields("ADsPath").Value profilePath = objEnregistrement.fields("profilePath").Value If (Not profilePath = "\\SRV-FICHIERS\profils$\profilcommun.MAN") Then Set objUser = getObject(objEnregistrement.fields("ADsPath")) Call objUser.put("profilePath", "\\SRV-FICHIERS\profils$\profilcommun.MAN") Call objUser.setInfo() End If Call objEnregistrement.moveNext() 'une fois fait la modif, on peut à item suivant Loop Call objConnexion.close()