Please review this code. I think that it comes very close to what you want to accomplish.
code:
Dim $LTeller, $LGroup
$LTeller = 0
Do
$LGroup = EnumLocalGroup($LTeller)
$LTeller=$LTeller+1
; Process group name for server name
$ServerFromLocalGroup = SubStr($LGroup, 3, Len($LGroup) - 2)
; Get group object
$oGroup = GetObject("WinNT://@domain/$LGroup,group")
; Process group members for global groups
for each $member in $oGroup.members
if $member.class = "group"
; find only Global groups
if $member.grouptype & 2
;process group name for share
$GrpName = $member.name
$GetShareNameFromGlobalGroup = SubStr($GrpName, InStr($GrpName, "_") + 1)
; Map resource
; How are you going to apply the drive letter?
endif
endif
next
Until Len($LGroup) = 0