Have a look at a sample I used. you would just have to add Case statements
for each departmental drive....
' ************************************************** ***********************
' * Logon Script for <Location> Users
' * Created 11/12/2006
' * Created By: Ryan Hanisco
' *
' * Version 1.0
' ************************************************** ***********************
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("Wscript.Network")
strUserPath = "LDAP://" & objSysInfo.UserName
Set objUser = GetObject(strUserPath)
For Each strGroup in objUser.MemberOf
strGroupPath = "LDAP://" & strGroup
Set objGroup = GetObject(strGroupPath)
strGroupName = objGroup.CN
'Map Drives Common to Everyone
objNetwork.MapNetworkDrive "H:", "\\<ServerName>\Home$\%UserName%"
objNetwork.MapNetworkDrive "s:", "\\<ServerName>\shared\Common"
Select Case strGroupName
Case "Mgmt"
objNetwork.MapNetworkDrive "U:", "\\<ServerName>\Management$" '
MGMT_Group
Case "HR"
objNetwork.MapNetworkDrive "U:", "\\<ServerName>\HR$" ' HR_Group
End Select
Set objGroup = Nothing
Next
Set objUser = Nothing
Set objNetwork = Nothing
Set objSysInfo = Nothing
--
Ryan Hanisco
MCSE, MCTS: SQL 2005, Project+
http://www.techsterity.com
Chicago, IL
Remember: Marking helpful answers helps everyone find the info they need
quickly.
"2Sweet" wrote:
> All users are Domain User. All users will have a 'H'and 'I' mapped drives
> after login to the their workstations.
> 'H' drive is their individual Home drive. 'I' drive is the department drive
> (different user from different department will have different mapped folder
> but same 'I' drive name).
>
> Based on the above, what is the best practise to do it?
>
>
>