Re: Logon script: Group membership not recognized?
- From: "Erik Cheizoo" <echeizoo.XenD.nl@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 5 Feb 2007 17:38:21 +0100
whoami.exe (A resource kit utility) has an option for showing all groups you're a member of.
http://www.microsoft.com/downloads/details.aspx?amp%3bdisplaylang=en&familyid=49ae8576-9bb9-4126-9761-ba8011fabf38&displaylang=en
--
Kind regards,
Erik Cheizoo
eXcellence & Difference - we keep your business running
============================================
Always test in a non-production environment before implementing
Guidelines for posting: http://support.microsoft.com/?id=555375
============================================
"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
.
- Prev by Date: Re: Delegating unlock to group of users
- Next by Date: Re: Security in AD
- Previous by thread: Re: Delegating unlock to group of users
- Next by thread: Re: Logon script: Group membership not recognized?
- Index(es):
Relevant Pages
|
Loading