Hey guys,
I have been constantly working and reworking my logon script for my
enterprise network here and I am always looking for better ways of
doing things.
Currently drives are mapped and files copied using security groups and
thats where it gets tricky. How do you cycle through all the groups the
user is in without slowing down the script?
So I was wondering what you guys do? Could you post a snipet of your
logon script code?
Currently I make an string of the groups the user is in by doing this:
For Each GroupObj In UserObj.Groups
UserGroups=UserGroups & "[" & UCASE(GroupObj.Name) & "]"
Next
Then I have a case statment with lots of these:
If InGroup("Stuff") Then
mapdrive "U:", "\\server\share"
End If
And that uses this function:
Function InGroup(strGroup)
InGroup=False
If InStr(UserGroups,"[" & strGroup & "]") Then
InGroup=True
End If
End Function
Problem is... the list of groups is getting pretty big and each user
needs to step through each case statment. And I am thinking it would be
more efficient if it would only run the parts that were required?
So back to my question. Does anyone have some cool code I can nab off
them?
Thanks,
Euan