If it has a plug, it's IT stuff

Jul 31 2008   3:34PM GMT

[TLBAT] Intranet: Enumerate client computer groups and their members

alessandro.panzetta Alessandro Panzetta Profile: alessandro.panzetta

So here we are…on the field 🙂

This is just a soft start, in this page we will create a page that shows the groups on the client computer that is surfing the ASP page and their relative members.

First we need to understand that this will work only in an environment where the security has been correctly set and on the IIS server for the directory where we will store the ASP files, the anonymous authentication has been disabled and the Windows authentication enabled. This must be done otherwise the pages will be run with the IUSR_xxxx account that has no privilege on the computers, if we enable the Windows authentication instead, the pages will be run by the logged on User.

Here is our first ASP page, copy the text below and paste it to your local_groups_members.asp page in the folder for the self service portal and run it.


<%@ language=”VBSCRIPT” %>


Dim ComputerName

ComputerName = Request.ServerVariables(“REMOTE_HOST”)




<meta name=”GENERATOR” content=”SAPIEN Technologies PrimalScript 3.1″>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>

<title>[<% Response.Write ComputerName %>] Local Groups and their members</title>




Set colGroups = GetObject(“WinNT://” & ComputerName & “”)

colGroups.Filter = Array(“group”)

Response.Write “<font face=tahoma size=3>”

Response.Write “Here is the list of the local Groups and their members for computer:<b>” & ComputerName & “</b><br><br>”

Response.Write “<table border=2 bordercolor=#006699>” & VbCrLf

For Each objGroup In colGroups

Response.Write “<tr><td bgcolor=’#006699′><font face=tahoma size=3 color=’white’> <b>” & objGroup.Name & ” </td></tr>” & VbCrLf

For Each objUser in objGroup.Members

Response.Write “<tr><td bgcolor=white><font face=tahoma size=2 color=’#006699′> ” & objUser.Name & ” </td></tr>” & VbCrLf



Response.Write “</table>” & VbCrLf





 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: