Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AD logon script path

Status
Not open for further replies.

Antoniof

IS-IT--Management
Oct 3, 2002
37
0
0
US
HI,

I have created a logon script for my win 2K AD network, now i need to go into every user and point the script path to the logon script I created. I have a 250 user enviroment and was wondering if there is a script that will allow me to do that.

Thanks
 
Is the script specific to each login? If not, try having the script run either per OU, or domain wide....
 
Hello Antoniof,

To change sriptpath systematically for all users in an ad domain, the simplest I can envisage of is to use WinNT: provider for a list of users and change its .loginscript property.
Code:
sdom="a1b2c3"    'your domain
spathsig="\\" & sdom & "\dfs\loginscripts\current\"    'your path signature

set odom=getobject("WinNT://" & sdom)
odom.filter=array("user")
for each ouser in odom
    ouser.loginscript=spathsig & ouser.name & ".vbs"
    ouser.setinfo
next
set odom=nothing
(It is with certain specific login script design, you have to adapt to your design.)

regards - tsuji
 
Thank you, I will test it and advise.
 
Don't mind my asking, but why wouldn't you create a GPO that sets this as a logon script for each user instead of pointing each users login script path in the user object to a script file? That is the beauty of GPO's in Active Directory.
 
I have to follow imposed guidelines and dont get much room to step out of them.
But thanks for the sugestion, it is always welcomed.
On the other hand the script with minor modifications worked perfectly.

Thank you to everyone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top