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
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:
- Open Notepad on server.
- Type
net usecommand line:net use Z: \\192.168.1.10\CompanyShare /persistent:yes - Click File > Save As....
- 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). - 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
- Open Server Manager > Tools > Active Directory Users and Computers (
dsa.msc). - Right-click target domain user (example:
sok.sao) > select Properties (or select multiple users at once). - Click Profile tab at top menu bar.
- In Logon script box, type script filename:
mapdrive.bat. - 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 insideNETLOGONfolder!
Step 3: Test Mapped Drive on Client PC
- On client computer, log off domain user and log back in (or restart PC).
- When user logs in, Windows executes
mapdrive.batscript automatically. - 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:
Related Tutorials
- ๐ Windows Server 2012 Complete Tutorial Series (Video in Khmer)
- ๐ 10 - Windows Server 2012 Map Network Drive to Client Computer (Video in Khmer)
- ๐ 11 - Windows Server 2012 Map Network Drive with GPO (Video in Khmer)
- ๐พ 13 - Windows Server 2012 Set Disk Storage to Client Computer (Video in Khmer)
- ๐ซ 14 - Windows Server 2012 Disable All USB Port using GPO (Video 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!