Shares:
\\10.12.8.130\ Sharing files
\\10.12.8.130\ personal file \ domain user account name
First, use the bat script file, such as Auto.bat:
NET use Z: \\vm-win81\ shared files
NET use x: \\vm-win81\ personal files \%username%
Open Group Policy Editor-User Configuration-policies-Windows Settings-scripts-Login-Add-Browse
Place the script file in this directory and refresh the Group Policy after saving.
Note The domain user account name directory should be built in advance. If a "system error 67 cannot find Network Name" error occurs: Check Z: There are no spaces between \ \ and whether the directory ends with "\". If it does not take effect, you can run the Rsop.msc or gpresult/v command on the client to view the Group Policy result set.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/EB/wKioL1RHX-yC11IdAAM8NMcKhiA382.jpg "title=" image 5. JPG "alt=" wkiol1rhx-yc11idaam8nmckhia382.jpg "/>
BAT is a lot of problems with landing scripts, so it is recommended to use VBS scripts.
Set WSHNetwork = WScript.CreateObject ("Wscript.Network")
Set WshShell = WScript.CreateObject ("Wscript.Shell")
Set Objdomain = CreateObject ("ADSystemInfo")
Wshnetwork.mapnetworkdrive "x:", "\\10.12.8.130\ shared File"
Wshnetwork.mapnetworkdrive "Z:", "\\10.12.8.130\ Personal file" + "\" & Wshnetwork.username
Note that the default Group Policy for WIN8 and above will wait 5 minutes before running the logon script, so the mapped drive letter is not immediately visible on boot. We still need to make some changes. Turn on Computer Configuration-policies-Administrative Templates-system-Group Policy, disable the Configure Logon script delay option.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/EB/wKioL1RHYDqzmFVPAARcH1gB45I644.jpg "title=" image 17. JPG "alt=" wkiol1rhydqzmfvpaarch1gb45i644.jpg "/>
Second, Windows Server R2 or 2012 can use the User Configuration-Preferences-Windows Settings-drive mapping feature.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/EB/wKioL1RHYenBndxEAAL46tIzkyo483.jpg "title=" image 18. JPG "alt=" wkiol1rhyenbndxeaal46tizkyo483.jpg "/>
General-project-level objectives set the user, computer, IP and other information in detail.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/EB/wKioL1RHYkjyNkpMAANg4WY4k-c999.jpg "title=" image 19. JPG "alt=" wkiol1rhykjynkpmaang4wy4k-c999.jpg "/>
Note that when the client is an XP system, you also need to install a patch file: Windows XP Group Policy Preference Client Extension (KB943729), which can be http://www.microsoft.com/zh-CN/download/ details.aspx?id=3628 download.
Windows Server R2 Client Auto-map sharing under a domain-controlled environment