dev.rean.me
windows-server

12 - Windows Server 2012 Map Network Drive to Client Computer with Script (Video in Khmer)

Learn how to map network drive to client computer on Windows Server 2012 R2 using logon script step-by-step with video tutorial in Khmer and tips for beginners.

2026-09-11 ยท 3 min read

Share:

Hello my friend! Today I show you step-by-step how to Map Network Drive to Client Computer on Windows Server 2012 R2 inside VMware using Logon Script! Logon script automatically runs batch file when domain user logs in to automatically map shared server folder! Very easy to follow with video tutorial in Khmer! Let's get started!

๐Ÿ’ก Tip: Using logon script is simple classic method to automatically connect network shared folders for all employees in department without configuring each PC manually!

Step 1: Create Logon Script File (mapdrive.bat)

First, create batch script file on server:

  1. Open Notepad on server.
  2. Type net use command line:
    net use Z: \\192.168.1.10\CompanyShare /persistent:yes
    
  3. Click File > Save As....
  4. Save file into Active Directory SYSVOL script folder: C:\Windows\SYSVOL\sysvol\mydomain.local\scripts\mapdrive.bat (or UNC path: \\mydomain.local\netlogon\mapdrive.bat).
  5. Choose Save as type: All Files (.) and name it mapdrive.bat.

๐Ÿ’ก Tip: Always save logon script inside Active Directory Netlogon share folder (\\mydomain.local\netlogon\) so all domain client PCs can read and run script automatically!

Step 2: Assign Logon Script to User Account in ADUC

  1. Open Server Manager > Tools > Active Directory Users and Computers (dsa.msc).
  2. Right-click target domain user (example: sok.sao) > select Properties (or select multiple users at once).
  3. Click Profile tab at top menu bar.
  4. In Logon script box, type script filename: mapdrive.bat.
  5. Click Apply > click OK.

๐Ÿ’ก Tip: Type ONLY script filename (example mapdrive.bat) in ADUC profile! You do NOT need to type full folder path because Active Directory automatically searches inside NETLOGON folder!

Step 3: Test Mapped Drive on Client PC

  1. On client computer, log off domain user and log back in (or restart PC).
  2. When user logs in, Windows executes mapdrive.bat script automatically.
  3. Open File Explorer (This PC): Mapped Drive Z: appears automatically!

Watch Video Tutorial (Khmer)

Watch full step-by-step video tutorial below to see complete process in Khmer:

Hope this tutorial help you map network drive using logon script on Windows Server 2012 R2 easily! Practice logon scripting and user profile management today. Happy learning my friends! Sharing is caring!