Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Windows 2003 Local Users accounts

Posted on 2009-05-03
Medium Priority
Last Modified: 2012-06-21
There's a few local accounts on a win 2003 server. I need to know a way to run a report on which groups each of these local accounts belong to.
Please provide example of utility to use, command line example, etc.
Question by:lurezero
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

Macros82 earned 1500 total points
ID: 24291706
I got this VB code from:      

'set path to server folder where output file will be saved
      'this should be changed for your environment
      'i.e. \\myserver\mainfolder\subfolder\targetfolder\
'do not modify below this line
      'get local computer name
Set objNet = CreateObject("WScript.Network")
      'build output file path and name
strOutputFile=strPath & "LocalAccts_" & strComputer & ".txt"
      'set constant for OpenTextFile of FileSystemObject - set to append
Const ForAppending = 8
      'create output file
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile _
    (strOutputFile, ForAppending, True)
Set colGroups = GetObject("WinNT://" & strComputer & "")
colGroups.Filter = Array("group")
For Each objGroup In colGroups
    For Each objUser in objGroup.Members
        objTextFile.WriteLine(strComputer & vbTab & objGroup.Name & vbTab & _


Author Comment

ID: 24337766
Thanks. Is there a way to generate the complete user name - first name and last name.
I am very new to vbscript....

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question