Doc, didn't I say that he should use security groups? I just made mention of the fact that fnInGroupAD() works with groups that InGroup() cannot handle (e.g. Universal Groups, Distribution Groups).

Duke, I don't think you've grasped how to use UDF's yet. There is no need to change the UDF at all, you include it in your script and then use it the same as a command or function that is native to KiX.

You should really review the FAQ: How to use UDFs