dragon
2009-12-11 19:25:10 UTC
Who can help me solve this problem please?
set Args = Wscript.ArgumentsouName = Args(0)
Object does not support this property or method. This bit of code cam
from configuring roaming profile in Window 2003 server.................
Someone is willing to explain to me what this script would be nic
too.
If I run this script with argument says cscript roamingprofile.vb
\\server\shareserver\firstname, will it split up to userName = firstnam
and RUProot= \\server\shareserver ? I couldn't figure out.
Thanks
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.ech
--
drago
-----------------------------------------------------------------------
dragon's Profile: http://forums.techarena.in/members/76434.ht
View this thread: http://forums.techarena.in/server-scripting/1281310.ht
http://forums.techarena.i
set Args = Wscript.ArgumentsouName = Args(0)
Object does not support this property or method. This bit of code cam
from configuring roaming profile in Window 2003 server.................
Someone is willing to explain to me what this script would be nic
too.
If I run this script with argument says cscript roamingprofile.vb
\\server\shareserver\firstname, will it split up to userName = firstnam
and RUProot= \\server\shareserver ? I couldn't figure out.
Thanks
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.ech
--
drago
-----------------------------------------------------------------------
dragon's Profile: http://forums.techarena.in/members/76434.ht
View this thread: http://forums.techarena.in/server-scripting/1281310.ht
http://forums.techarena.i