Re: Logon script: Group membership not recognized?
- From: "Darren Mar-Elia" <dmanonymous@xxxxxxxxxxxxx>
- Date: Mon, 29 Jan 2007 06:56:25 -0800
When you run GPResults against these users, does it show them as being a member of this group?
--
Darren Mar-Elia
MS-MVP-Windows Server--Group Policy
http://www.gpoguy.com -- The Windows Group Policy Information Hub:
FAQs, Training Videos, Whitepapers and Utilities for all things Group
Policy-related
Speed Group Policy Troubleshooting with the NEW GPHealth Reporter tool at http://www.sdmsoftware.com/products.php
"Mike" <Mike@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:750CE00D-C0A6-4FD4-B1E2-A85C8FC79F19@xxxxxxxxxxxxxxxx
The logon script below disconnects a couple drive letters and then maps them
to the appropriate share based on group membership. The script works just
fine, but it doesn't run properly for a few people.
For the people it doesn't run properly for, the script disconnects the S and
P drives like it should. However, the section where it maps the S and P
drives for users in the DEPT Employees group does not run for these few
users. These users are members of that group.
Any ideas? The script is solid, so the problem must be with the user
accounts. The script is pasted below just so you can see it.
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("Wscript.Network")
'These 2 lines force the drives to be disconnected
'The first TRUE unmaps the drive even if in use
'The second TRUE removes the mapping from the user profile
objNetwork.RemoveNetworkDrive "S:", True, True
objNetwork.RemoveNetworkDrive "P:", True, True
strUserPath = "LDAP://" & objSysInfo.UserName
Set objUser = GetObject(strUserPath)
For Each strGroup in objUser.MemberOf
strGroupPath = "LDAP://" & strGroup
Set objGroup = GetObject(strGroupPath)
strGroupName = objGroup.CN
'TRUE in the statements below stores the drive mapping in the user profile
'making the mapping persist and available when disconnected from the network
Select Case strGroupName
Case "DEPT Employees"
objNetwork.MapNetworkDrive "S:", "\\server1\shared", True
objNetwork.MapNetworkDrive "P:",
"\\server2\fsTaskMan\Report\OutputFiles", True
End Select
Next
.
- References:
- Prev by Date: Logon script: Group membership not recognized?
- Next by Date: Re: How do I reset the age on users passwords?
- Previous by thread: Logon script: Group membership not recognized?
- Next by thread: Acitive Directory un Win2000
- Index(es):
Relevant Pages
|