Group lookup problem
- From: Rory <Rory@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 9 May 2008 11:53:00 -0700
I have an old script I use to verify what groups a user is in and then run
scripts based on thoughs groups. This script run perfectly fine on my current
domain/forest with all users.
However when I created a new domain/forest for a sub company that is braking
off from us the script no longer works.
The funny part is that for Domain admins it works fine but not for a regluar
user. I think it is some permission change in AD and would like to know what
I have to change to get this to work.
Here is the part of the script I use to vailadate groups:
' Check For Group Messages and Mappings
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" &ADSysInfo.UserName)
arrMemberOf = CurrentUser.MemberOf
For each Group in arrMemberOf
Group = Mid(Group,4)
intLeft = Instr(Group,",") - 1
Group = Left(Group, intLeft)
'WScript.Echo Group
' Check for a message for each Group
Messagepath = Scrpath & "\" & Group & ".txt"
'WScript.Echo Messagepath
If (fso.FileExists(Messagepath)) Then
Set f = fso.OpenTextFile(Messagepath, ForReading, True)
temp = WShShell.Popup(f.Readall,30,ExtremeM, 0 + 48)
End If
' Chech for a Script for each Group
Scriptpath = Scrpath & "\" & Group & ".VBS"
'WScript.Echo Scriptpath
If (fso.FileExists(Scriptpath)) Then
Temp = WshShell.Run(Scriptpath ,1 , True)
End If
Next
.
- Follow-Ups:
- Re: Group lookup problem
- From: Richard Mueller [MVP]
- Re: Group lookup problem
- Prev by Date: Re: Needing replacing a backslash by a comma
- Next by Date: extracting the info from quotes!!
- Previous by thread: Needing replacing a backslash by a comma
- Next by thread: Re: Group lookup problem
- Index(es):
Relevant Pages
|
|