Right i want to be able to give some limited power to the admin staff at my work so that they can add users to the active directory server, simple
the problem i have is i want the vbs to also add a right logon script and profile path etc.
i have got this far and have tried all sorts of ways to get that infomation into the account but am yet to find the solution !!!!!!!!!!!!!! AHHHH driving me mad.
i can add the user to AD and it all works other than there is no loginscript.bat applied or c:\myprofile applied
im aware that the script now has no way of making this info as it has been removed to stop confusion , and to be honest i dont think the method i had was much cop anyhow.
script as follows
dim objuser
StrFulluser = inputbox("Full Name")
Struserin = inputbox("Username")
StrDescription = inputbox("Account Decription")
StrDomain = inputbox("Domain To Add user to")
StrPassword = inputbox("Enter The Users Password")
strprofile = inputbox("profile")
strscript = inputbox("script")
strhomedir = inputbox("home")
Adduserconfig Struserin,StrDomain,Strprofile,Strscript,Strhomedir
sub Adduserconfig(strUser,strDomain,strProfile,strScript, strHomedir)
Dim Computer
Dim User
Set Computer = Getobject("WinNT://" & strDomain)
Set User = computer.create("User",strUser)
User.fullname = strFullname
User.Description = strDesc
call User.SetPassword(strPassword)
User.setinfo
Set User = nothing
Set computer = nothing
End sub
the problem i have is i want the vbs to also add a right logon script and profile path etc.
i have got this far and have tried all sorts of ways to get that infomation into the account but am yet to find the solution !!!!!!!!!!!!!! AHHHH driving me mad.
i can add the user to AD and it all works other than there is no loginscript.bat applied or c:\myprofile applied
im aware that the script now has no way of making this info as it has been removed to stop confusion , and to be honest i dont think the method i had was much cop anyhow.
script as follows
dim objuser
StrFulluser = inputbox("Full Name")
Struserin = inputbox("Username")
StrDescription = inputbox("Account Decription")
StrDomain = inputbox("Domain To Add user to")
StrPassword = inputbox("Enter The Users Password")
strprofile = inputbox("profile")
strscript = inputbox("script")
strhomedir = inputbox("home")
Adduserconfig Struserin,StrDomain,Strprofile,Strscript,Strhomedir
sub Adduserconfig(strUser,strDomain,strProfile,strScript, strHomedir)
Dim Computer
Dim User
Set Computer = Getobject("WinNT://" & strDomain)
Set User = computer.create("User",strUser)
User.fullname = strFullname
User.Description = strDesc
call User.SetPassword(strPassword)
User.setinfo
Set User = nothing
Set computer = nothing
End sub