Hello.
I think that the problem is related somehow with communication between XP
and PDC, because if I enable Netbios over TCP/IP it works sometimes.
Anyway, as a workaround, I coded this simple script that works. Maybe you
find it useful:

code:
Function belongsToGroup($username, $groupname)

If @INWIN<>2 ;Windows 2000/XP
$domain = GetObject("WinNT://@LDOMAIN")
$domain.filter = "group",""

$belongsToGroup = 0

For Each $group in $domain
If $group.name = $groupname
For Each $user in $group.members
If $user.name = $username
$belongsToGroup=1
EndIf
Next
EndIf
Next
Else ;Windows 9x
$belongsToGroup = InGroup($groupname);
EndIf
EndFunction