Discussion Locked

User Manager

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do I print or export all users in User Manager for NT?

9 replies

by beermonster

Hi,
I believe netdom from the reskit will do this, otherwise mail me - darthurs@hotmail.com - and I'll send you a vbscript that will do it.

by a.jongsma

'* Users.VBS
'* Creates a list of all users in a domain and places them in a text file
'* Each row in the file contains User ID, Description (TAB-delimited) and IsAccountLocked (True or False).
'******************************************************************************************

Dim Container 'As IADsContainer
Dim oUser 'As IADsUser
Dim fs 'As FileSystemObject
Dim f 'As Object

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.CreateTextFile("users.txt", True)

sContainerName = InputBox("Enter NT Domain Name", "List Users in an NT Domain", "MYDOMAIN")

Set Container = GetObject("WinNT://" & sContainerName)
Container.Filter = Array("User")

For Each oUser In Container
f.WriteLine oUser.Name & chr(9) & oUser.Description & Chr(9) & oUser.IsAccountLocked
Next

f.Close
wscript.echo "Complete"

by joncr

Hyena is a good User Manager replacement and you can export easily with it.

Hope this helps.

by sribeiro

I tried to execute your script and received this message:
LIne : 11
Char : 1
Error : Invalid Syntax
Code : 800401E4
Source : Null

This discussion is closed to new replies.