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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Map Drive automatically? Scripting help! 1

Status
Not open for further replies.

Stevehewitt

IS-IT--Management
Jun 7, 2001
2,075
GB
Hey,

After having a huge influx of people joining the firm, the boss has got me a load of new comps. One prob, how do I get a user in a GPO (I have a OU called standard users in it) to automaticaly map network drives. I really don't want to do it manually.

I thought of using a script, but I honestly don't know much about it (I knew I should of paied attention during that part of the MCSE course! :))
Any sample scripts out there?...

Please...anyone?! Steve Hewitt
IT Administrator

Windows 2000 Microsoft Certified System Engineer

 
net use p: \\computername\sharename will map a drive from a script(in this case p:)

net use p: /d will delete it.

net use /? will give you some additional switches
 
You will need to use Windows Scripting Host to enumerate the OUs/Groups users are in. The Net has zillions of examples, but I can post a cool VB Script example if you are a script newbie.
 
Hi.

Yeah, I am a complete newbie when it comes to scripts. Never done anything! Toyed with winbatch, and I can just about managed to edit Win.ini/config.sys etc.
Thats my limit.

Can you post a script?

Cheers Steve Hewitt
IT Administrator

Windows 2000 Microsoft Certified System Engineer

 
Sorry about the delay...will post to freedrive in the next 24 hours, let you know then...
 
Just a quick question- are you mapping drives for resources or user's files? If you are just mapping for use of user's files use the folder redirection features of GPOs.
 
if you are maping home drives you can also "net use h: \\sharename\%username%"
 
Your simplest solution is a logon.bat file that you put in the users account in usermanager.

you can name the logon.bat different for different groups and just put the

net use x: \\myserver\sharename appropriate for the user.

To do it right you need the Windows Scripting Host but It can take a while to get your script right...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top