I tried the net users command in a DOS window but this only list all the accounts (No Description Field)
Thanks,
Eric
This post has been edited by fake_usa: 16 May 2006 - 07:15 AM
Posted 16 May 2006 - 07:08 AM
This post has been edited by fake_usa: 16 May 2006 - 07:15 AM
Posted 16 May 2006 - 08:15 AM
Quote
Posted 20 May 2006 - 04:01 AM
'********************************************************************
'*
'* File: DomainUinfo.vbs
'* Created: September 2005
'* Version: 2k510.03
'*
'* ' Sample Script For Listing All The User Related Infomations In The Domain.
'*
'* Main Function: Listing All The User Related Infomations In The Domain.
'*
'* Syntax Domain Name
'*
'* Copyright (C) 2005 N Nattiala
'*
'********************************************************************
' Description - This portion of the script will attach to the domain using the
' WinNt provider and filter out a list of every computer object's
' name and write them to DomUinfo.txt. If the file already exists it will
' overwrite, otherwise it will create the file.
'-------------------------------------------------
' Insert WARNING here...
Msgbox " This script will collect all the Computers,Domain User and Group related information and"_
& vbcrlf & vbcrlf & " store in DOMUINFO.TXT. Please input your Domain name according to your environment" _
& vbcrlf & vbcrlf & " Created and Completed By: N Nattiala. ",48,"WARNING"
' Check for the existence of DomUinfo.txt.
' and open for Writing.
Dim myComputer, objUser, objGroup
Dim myDomain
Set fsoObject = WScript.CreateObject("Scripting.FileSystemObject")
If (fsoObject.FileExists("DomUinfo.txt")) Then
Set open_File = fsoObject.OpenTextFile("DomUinfo.txt", 2)
Else
Set open_File = fsoObject.OpenTextFile("DomUinfo.txt", 2, "True")
End If
' Get Domain Name
myDomain = Inputbox ("Please Enter Your Domain Name: "_
& vbcrlf & vbcrlf & " Take Care")
msgbox" Your Domain Name is :" &mydomain _
& vbcrlf & vbcrlf &"This is the LAST STAGE TO STOP MY SCRIPT",vbYesNo,"Warning"
' Attach to the domain and search for all
' computer objects. Dump the names into
' DomUinfo.txt.
Set myComputer = GetObject ( "WinNT://"& mydomain )
myComputer.Filter = Array("computer")
For Each item in myComputer
open_File.Writeline (item.Name)
Next
myComputer.Filter = Array("user")
For Each objuser in myComputer
open_File.Writeline (",User Name," & objUser.Name & " ,Full Name," & objuser.fullname & " ,Description," & objuser.description )
Next
myComputer.Filter = Array("group")
For Each objGroup In myComputer
For Each objUser In objGroup.Members
open_File.Writeline (",Group, " & objGroup.Name & ",Member, " & objUser.Name)
Next
Next
' Closes the file
open_File.Close()
Posted 20 May 2006 - 05:59 AM