Yeah that function has bitten me also. Weird function, bad examples. Cant get the user ou to work yet. Should have tried it before givving the link 
The group goes like this:
Code:
$group = "Domain Admins"
If fnInGroupAD($group)
?"The user is a member of " + $group + "."
Sleep 3
Else
?"The user IS NOT a member of " + $group + "."
EndIf
;Function:
; fnInGroupAD()
;
;Author:
; Christopher Shilt (christopher.shilt@relizon.com)
;
;Version:
; 1.0 (June 22, 2005)
;
;Version History:
;
;Action:
; Determines if a user or computer is a member of an Active Directory Group
;
;Syntax:
; fnInGroupAD(GROUP, Optional MODE)
;
;Parameters:
; WHAT : Required. Group to test for membership of.
;
; MODE : Optional. Specifies whether to search the group membership For
; the current user account or the current computer account.
; MODE = 0 (user)
; MODE = 1 (computer)
;
;Remarks:
;
; This function is meant to compliment KiXtart's built-in InGroup function, not
; replace or mimic it's functionality. The built-in InGroup function cannot test
; for membership of computer accounts or Universal groups.
;
;Returns:
;
; 0 The user or computer IS NOT a member of a group with this name
; 1 The user or computer IS a member of a group with this name
;
;Dependencies:
;
;
;Example:
;
; ; == Test the functionality of the built-in InGroup =============
; If InGroup("TestUniversalGroup")
; "This will always be false" ?
; EndIf
;
; ; == Test if the current user is a member of a group ============
; If fnInGroupAD("TestUniversalGroup")
; "The user is a member of the TestUniversalGroup" ?
; EndIf
;
; ; == Test if the current computer is a member of a group =======
; If fnInGroupAD("TestUniversalGroup",1)
; "The computer is a member of the TestUniversalGroup" ?
; EndIf
;
;
Function fnInGroupAD($sGroup,Optional $bComputer)
Dim $objSys,$objTarget,$aMemberOf,$sMemberOf
$objSys = CreateObject("ADSystemInfo")
$objTarget = GetObject("LDAP://"+IIf($bComputer,$objSys.ComputerName,$objSys.UserName))
$aMemberOf = $objTarget.GetEx("memberOf")
For Each $sMemberOf in $aMemberOf
If InStr($sMemberOf,"CN="+$sGroup+",")
$fnInGroupAD = NOT 0
Exit
EndIf
Next
$fnInGroupAD = NOT 1
EndFunction