is this a local or admin script?

what OS NT or w2k/xp

you can do this using ADSI.

to run ADSI on a local NT box you will need to install it. but you do not need to install ADSI on a NT box if you do these changes from a remote computer that already has ADSI installed.

w2k/xp come shipped with ADSI installed.

you can use this UDF to pull the members of a group.

GroupMembers()

here is a bit of code.

code:
$searchuser = "brycel"
$users = groupmembers(@domain/@wksta,"administrators",2)

$totalusers = ubound($users)

for $i = 0 to $totalusers
if $users[$i] = $SearchUser
? "the user '$searchuser' was found the the group Administrators"
$i = $totalusers
endif
next

Bryce