如何知道用户属于哪一个组?

下面的代码就可以实现这个功能:

dsRoot = "WinNT://domain/userid"
set wshShell = Wscript.CreateObject("Wscript.Shell")
set dsObj = GetObject(dsRoot)
For Each Prop In dsobj.groups
wshshell.popup Prop.Name
Next 'Prop