Thursday 25 February 2016

Create Logon Script - NetLogon

Auto map network drives on login for all users
  1. Save the following batch file to the domain controller's NETLOGON share as logon.bat:
    @echo off
    net use * /delete /yes
    net use x: \\server_name\shared_directory_name
  2. Active Directory Users and Computers
  3. Right click domain name at top left and click Properties > Group Policy > Edit > User Configuration > Windows Settings > Scripts (Logon/Logoff) > Logon > Add...
  4. Enter path to logon.bat (e.g., \\ACME.local\sysvol\ACME.local\scripts\logon.bat) and click OK three times
  5. Login from workstation. Drive x: should appear in My Computer.
Auto map network drives on login for certain users:
  1. Save the following batch file to the domain controller's NETLOGON share as logon.bat:
    @echo off
    net use * /delete /yes
    net use x: \\file_server_name\shared_directory_name
  2. Active Directory Users and Computers > Users > Double click user > Profile
  3. Enter "logon.bat" (no quotes) in the "Logon script" box and click OK
  4. Login from workstation as user modified in step 2. Drive x: should appear in My Computer.

No comments:

Post a Comment