Ok I did some reading...so basically in order to use a UDF you also need to copy and paste the function part in your script. Thanks,




If ComputerInGroup('server')=1
exit
endif


Function ComputerInGroup($group,optional $Domain)
Dim $oGrp
if not $domain $domain=@domain endif
$oGrp = GetObject("WinNT://" + $domain + "/" + $group + ",group" )
if @error exit 1 endif

if $oGrp.IsMember("WinNT://" + $domain + "/" + @wksta + "$$" )
$ComputerInGroup=1
else
$ComputerInGroup=0
endif
endfunction


Edited by rwani (2006-03-28 01:11 AM)