Because I found this moderately interesting I decided to do a little more... this is as close to silver platter as it gets...
Code:
break on
$=setoption("WrapAtEOL","ON")
;**************************
;Get the user's groups
;**************************
$cn="cn=" + @fullname
$ou="ou=user,ou=xyz"
$dc="dc=your,dc=domain,dc=com"
$objUser = GetObject("LDAP://" + $cn + "," + $ou + "," + $dc)
$Groups = $objUser.Getex("memberof")
;***********************************
;Find the Groups with LOC and get the description
;only displaying the 2nd part by using the delimiter ";"
;***********************************
$findstr="LOC"
$delim=";"
$counter=0
while $counter<=ubound($groups) and $found<>1
if instr($groups[$counter],$findstr)>0
$found=1
$descrip=split(getobject("LDAP://" + $groups[$counter]).get("Description"),$delim)[1]
? $descrip
endif
$counter=$counter + 1
loop
Now all you should have to do is replace the variables and the ? $descrip line with whatever drive mapping you have. Hope this helps.