How to get a list of existing local groups on a computer ?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I am searching some vbscript code to enumerate the existing local groups on a particular computer. I know how to enumerate groups in an active directory container but I don't see how to do it directly on a computer. To give you a better idea, I want the script to give me the same kind of list as the cmd command "net localgroup". Does anybody have an idea ?

Thanks for your help.
.