Windows Server R2 Client Auto-map sharing under a domain-controlled environment

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.