Network Drive Mapping Scripts

Discussion in 'Networks' started by cmcinnes, Mar 9, 2005.

  1. cmcinnes

    cmcinnes Bit Poster

    13
    0
    0
    I have another problem relating to my last post. Now that have distibuted the mapped network drive accross domain controller, is there any scripts that can auto generate mapped network drives when ever a user account is created in Active Directory.

    Again any help would be very gratefaul and thank you in advance for your help

    Chris
     
    Certifications: HNC,HND Computer And Network Support
  2. Phoenix
    Honorary Member

    Phoenix 53656e696f7220 4d6f64

    5,749
    200
    246
    you would want to use Group Policy for this, its quite a complicated system, but simple policies can be implemented with just a little fiddling about

    here is a link i found @ Microsoft
    http://www.microsoft.com/windows2000/techinfo/howitworks/management/grouppolwp.asp

    that explains the technology

    ideally you would just group policy to deploy a startup script (net use etc etc)
     
    Certifications: MCSE, MCITP, VCP
    WIP: > 0
  3. SimonV
    Honorary Member

    SimonV Petabyte Poster Gold Member

    6,651
    180
    258
    Do you mean for use as a logon script. A simple batch file can do this job.

    In notepad add a line for each mapped drive like so

    net use <drive letter>: \\<servername>\<sharename>

    eg

    net use J: \\fileserver1\accounts

    then save the text file with a .bat file extension. You can then add this to the users profile or add it as a logon script to an OU group policy in active directory.
     
    Certifications: MOS Master 2003, CompTIA A+, MCSA:M, MCSE
    WIP: Keeping CF Alive...
  4. AJ

    AJ 01000001 01100100 01101101 01101001 01101110 Administrator

    6,897
    182
    221
    That's exactly how we do it Si

    Map the drive letter to their home directory, map a drive to another server and also to enforce the wallpaper (yawn the school crest) as we have roaming profiles.
     
    Certifications: MCSE, MCSA (messaging), ITIL Foundation v3
    WIP: Breathing in and out, but not out and in, that's just wrong
  5. cmcinnes

    cmcinnes Bit Poster

    13
    0
    0
    Hi All

    i have already implmemnted the NET USE scripts for the current user accounts on the domain but we are due an influx of staff soon so what i was thinkning about was a way in when a user account is created a mapped network drive is automatically created as well. As it would save a hell of a lot of time

    Cheers

    Chris
     
    Certifications: HNC,HND Computer And Network Support
  6. SimonV
    Honorary Member

    SimonV Petabyte Poster Gold Member

    6,651
    180
    258
    I'm not sure I fully understand your request, do you mean the creation of the folder that is to be mapped by the script?
     
    Certifications: MOS Master 2003, CompTIA A+, MCSA:M, MCSE
    WIP: Keeping CF Alive...
  7. cmcinnes

    cmcinnes Bit Poster

    13
    0
    0
    Sorry i have just noticed that i am not being quite clear. What i was looking to do was create individual mapped network drives for each user ie when a user account is created for joe.bloggs automatically a mapped network drive in \\servername\Users\joe.bloggs would be created. Sorry if i saint being very clear

    Cheers

    Chris
     
    Certifications: HNC,HND Computer And Network Support
  8. SimonV
    Honorary Member

    SimonV Petabyte Poster Gold Member

    6,651
    180
    258
    What I tend to do is use the home folder section of the Profile tab in the user account properties for creating a users home folder using the %username% variable.

    [​IMG]

    Lets say that its the drive letter J: to be mapped to \\servername\Users\joe.bloggs then I would change the drop down to J: and enter \\servername\Users\%username% in the To: box. Windows will create that folder substituting the %username% variable with the username of the account that your working on and will map that drive witout the need of a script. Win98 client wont map this drive so you can work round this but using "net use /home" as part of a logon script.

    If your wishing to create more than just the one folder per new user then your going to have to use some sort of script to create these folders.

    HTH
     
    Certifications: MOS Master 2003, CompTIA A+, MCSA:M, MCSE
    WIP: Keeping CF Alive...
  9. AJ

    AJ 01000001 01100100 01101101 01101001 01101110 Administrator

    6,897
    182
    221
    Sounds like you want to make a home folder for a new user either when they logon or when the account is made.

    If that is the case the way we do it is to specify the home folder in group policy ie \\server\home_folder\%username%

    We also use a logon script that gives the drive letter to the home folder. THe logon script is just a small batch file that we keep in the SYSVOL folder. The logon.bat script is defined in the profile tab on the users AD properties.

    Think that's right if not then it's late :oops:




    edit: or wot Si said :dry
     
    Certifications: MCSE, MCSA (messaging), ITIL Foundation v3
    WIP: Breathing in and out, but not out and in, that's just wrong
  10. cmcinnes

    cmcinnes Bit Poster

    13
    0
    0
    Thanks Si & AJ that exactly what i was looking for. You have made my day at work tomorrow a hell of a lot easier

    Thanks again much appreciated

    Chris
     
    Certifications: HNC,HND Computer And Network Support

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.