Below is an example that should work.

This script requires the UserGroups() UDF.
UDF Library » UserGroups() - returns all groups of a given user

 Code:
Break on

$rc = Open (1, "c:\usernames.txt", 2)

$line = ReadLine(1)

While Not @ERROR And Trim($line) <> ""
	$line = Split($line, ";")
	$usergroups = UserGroups(@DOMAIN, $line[0])
	If UBound($usergroups) <> -1
		For Each $usergroup in $usergroups
			If $usergroup = $line[1] Or  $usergroup = $line[2]
				?$line[0] " is a meber of " $line[1] " or " $line[2]
			Else
				?$line[0] " is not a meber of " $line[1] " or " $line[2]
		Next
	Else
		? $line " does not have any groupmemberships. "
	EndIf
	Sleep 2
	$line = ReadLine(1)
Loop

$rc = Close (1)


Edited by Mart (2008-04-25 12:20 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.