Automatically Map Network Drives on Domain Login for All Users, Certain Users, or Certain Groups
As always, use the following instructions at your own risk (and joy). Please submit any if you feel so moved.
[@more@]Automatically Map Network Drives on Domain Login for All Users, Certain Users, or Certain Groups
As always, use the following instructions at your own risk (and joy). Please submit any if you feel so moved.
Auto map network drives on login for all users
- 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_nameshared_directory_name - Active Directory Users and Computers
- Right click domain name at top left and click Properties > Group Policy > Edit > User Configuration > Windows Settings > Scripts (Logon/Logoff) > Logon > Add...
- Enter path to logon.bat (e.g., ACME.localsysvolACME.localscriptslogon.bat) and click OK three times
- Login from workstation. Drive x: should appear in My Computer.
Auto map network drives on login for certain users:
- 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_nameshared_directory_name - Active Directory Users and Computers > Users > Double click user > Profile
- Enter "logon.bat" (no quotes) in the "Logon script" box and click OK
- Login from workstation as user modified in step 2. Drive x: should appear in My Computer.
Auto map network drives on login based on Group membership
- Get
- Put WKIX32.EXE in both the domain controller's NETLOGON share and %SystemRoot% (normally C:WINNT).
- Save the following script as map_drive.kx to the NETLOGON share (be sure to change the group as needed - here we've used Domain Users):
use "*" /DELETE
if ingroup("Domain Users")
use x: "server_nameshare_name"
endif - Save the following batch file (which calls your KiXtart script) as login.bat to the domain controller's NETLOGON share:
@echo off
server_nameNETLOGONWKIX32.EXE server_nameNETLOGONmap_drive.kx - Active Directory Users and Computers
- Right click domain name at top left and click Properties > Group Policy > Edit > User Configuration > Windows Settings > Scripts (Logon/Logoff) > Logon > Add...
- Enter path to login.bat (e.g., ACME.localsysvolACME.localscriptslogin.bat) and click OK three times
- Login from workstation as a user belonging to group designated in map_drive.kx. Drive x: should appear in My Computer.
- If x: does not appear, check the permissions of NETLOGON, WKIX32.EXE, your script files, etc. Also, make sure that the user or group has the necessary permissions on the shared folder you are mapping.
More KiXtart Examples
- Map drive if user is *not* a member of a certain group (in this case, "Students"):
If InGroup("Students") = 0 Use R: "serverrecords" EndIf
- Using Boolean operators:
If InGroup("Teachers") Or InGroup("Office") Or InGroup("PTA") Use G: "serverGrownup_Files" EndIf If InGroup("2008 Class") And InGroup("Honors") Use S: "serversmart_kids" EndIf
- Using Select...EndSelect (stops processing on the first true Case)
Select Case InGroup("Students") Use S: "serverstudent_storage" Case InGroup("Office") Use O: "serveroffice_docs" Use R: "serverrecords" Case InGroup("Teachers") Use O: "serveroffice_docs" Use S: "serverstudent_storage" Use T: "serverteaching_materials" EndSelect
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24252091/viewspace-1222032/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Get the characteristics of a certain class for a certain materialAI
- NETAPP - LOGIN TOO MANY USERSAPP
- Import all grant statement of users in mysql schema !ImportMySql
- Types of Oracle Database Users : Database Users (6)OracleDatabase
- Types of Oracle Database Users : Network Administrators (3)OracleDatabase
- OBIEE 11g users still able to login even with invalid password
- Oracle default usersOracle
- Another excuse is usually to be parajumpers sale certain safetyAI
- 用sp_change_users_login消除Sql Server的孤立使用者SQLServer
- Recipe 4.7. Blocking Inserts to Certain ColumnsBloCAI
- oracle users 表空間Oracle
- Move users between domainsAI
- Oracle Created (Default) Database UsersOracleDatabase
- 262-Trips and Users
- How Users Read on the Web (轉)Web
- Poor Performance On Certain Dictionary Queries After Upgrade To 10gORMAI
- Certain:2017年事件營銷調查報告AI事件
- 2.2.2 Overview of Common and Local Users in a CDBView
- Oracle users / 許可權 / grant privOracle
- MyEtherWallet Domain-Hijacking Financially Victimized 198 Users, Causing $320K LossAINaNZed
- Avoided redundant navigation to current location: "/users"IDENavigation
- Types of Oracle Database Users : Security Officers (2)OracleDatabase
- Types of Oracle Database Users : Application Developers (4)OracleDatabaseAPPDeveloper
- win10系統c盤users在哪_win10系統c盤users怎麼開啟Win10
- itpub網友問題--如何讓某資料庫使用者不能查詢all_users資料庫
- Types of Oracle Database Users : Database Administrators (1)OracleDatabase
- Tasks of a Database Administrator : Enroll System Users (12)Database
- win10系統下Users資料夾在哪 win10系統Users資料夾怎麼開啟Win10
- 建立遷移檔案 auth 認證表 users
- Badass users are not fans of the company (圖靈訪談)圖靈
- Types of Oracle Database Users : Application Administrators (5)OracleDatabaseAPP
- TNS-12535 Unable To Connect To Remote Database using certain ApplicationsREMDatabaseAIAPP
- Hadoop官網翻譯之HDFS Users GuideHadoopGUIIDE
- ORA-32773: operation not supported for smallfile tablespace USERS 解決
- Windows7系統關閉users共享的方法Windows
- Creating a Password File and Adding New Users to It (47)
- Protecting Your Database: Specifying Passwords for Users SYS and SYSTEM (70)Database
- How can I prevent users from connecting to a USB storage device?dev