Búsqueda personalizada
Regístrate gratis para participar de los foros, o si ya estás registrado haz login.
| comentario del autor | Vie Nov 06, 2009 4:02 pm | |
|
set Args = Wscript.ArgumentsouName = Args(0) usrName = Args(1) RUProot = Args(2) RUPpath = RUProot & " \" & usrName 'Get the domain Set dse = GetObject(" LDAP://RootDSE" ) Set domain = GetObject( " LDAP://" & dse.Get(" defaultNamingContext" )) set ou = domain.GetObject(" organizationalUnit" , " OU=" & ouName ) wscript.echo " Creating user in " & ou.Name set usr = ou.Create(" user" , " cn=" & usrName ) usr.Put " samAccountName" , usrName usr.Put " userPrincipalName" , usrName usr.Put " Profilepath" , RUPpath usr.SetInfo wscript.echo " User " & usrName & " was created successfully in " & ou.Name & " with a RUP Path of: " & RUPpath |
||