Results 1 to 4 of 4

Thread: Logon Script to Map Network Drive based on the primary group name

  1. #1
    Join Date
    Sep 2004
    Posts
    20

    Logon Script to Map Network Drive based on the primary group name

    I have recently configured a Windows Server with AD. I Created and used a logon script to set users home folders as \\ad\home
    $\%username%. Now what I want to do is using the same for additional shared folders based on users group name. I tried to do this but not be to get it done.

    So I need help from you all. Can anyone here please tell me is it possible doing using net use command? If yes, please let me know how.

  2. #2
    Join Date
    Jan 2006
    Posts
    605

    Re: Logon Script to Map Network Drive based on the primary group name

    Most probably you can do it easily using ismember within vbscript. I found such logon script on Mueller's website which can help you out for the same. Just google for rlmuller.net and get the script.

    For more help on the same you should also check out Microsoft script center
    http://www.microsoft.com/technet/scr....mspx?mfr=true

  3. #3
    Join Date
    Jun 2006
    Posts
    206

    Re: Logon Script to Map Network Drive based on the primary group name

    I was searching the for some solutions related to your question. meanwhile i came through a Microsoft Article describing:

    "How to dynamically create security-enhanced redirected folders by using folder redirection in Windows 2000 and in Windows Server 2003"

    This is what you need to do. Have a look.

  4. #4
    Join Date
    Jan 2006
    Posts
    7,109

    Re: Logon Script to Map Network Drive based on the primary group name

    Well i have been through this earlier with my Domain and users. In this all you need to do is change the IT to whatever group you have. You can write as many if statements with as many different groups as you want. It seems as flexible as ifmember if you ask me.

    If IsAMemberOf(objNetwork.UserDomain,objNetwork.UserName,"IT") Then
    Write Code Here
    End If

    'Determines Group Membership
    Function IsAMemberOf(strDomain,strUser,strGroup)

    Dim objGrp

    Set objUser=GetObject("WinNT://" & strDomain & "/" & strUser &
    ",user")
    On Error Resume Next
    Set objGrp=GetObject("WinNT://" & strDomain & "/" & strGroup &
    ",group")
    If (Err.Number <> 0) Then
    On Error GoTo 0
    IsAMemberOf = False
    Else
    On Error GoTo 0
    If objGrp.IsMember(objUser.AdsPath) Then
    IsAMemberOf = True
    Else
    IsAMemberOf = False
    End If
    End If

    End Function

    Hope this helps,
    Matt

Similar Threads

  1. Replies: 3
    Last Post: 17-08-2010, 09:06 PM
  2. Group Policy logon script not applied if connected by WiFi
    By Alister in forum Active Directory
    Replies: 8
    Last Post: 09-01-2010, 01:10 AM
  3. Group policy logon script doesn't run
    By CryptiniteDemon in forum Windows Server Help
    Replies: 5
    Last Post: 21-07-2009, 06:44 PM
  4. Use logon script to map network printer
    By Mitch in forum Windows Server Help
    Replies: 4
    Last Post: 18-12-2008, 08:25 AM
  5. Removing and remapping network drives using logon script
    By jacobscharlene in forum Software Development
    Replies: 1
    Last Post: 17-12-2008, 03:43 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,464,037.88594 seconds with 17 queries