PC Review


Reply
Thread Tools Rate Thread

AD export info

 
 
JDM
Guest
Posts: n/a
 
      15th Jan 2004
Is there a script or command (with the options) for me to be able to
export all of our disabled user accounts listed in the AD to a file? I
have played around with CSVDE and cannot seem to get it to work. All
I need is an exported file with all of our disabled user accounts in it.

does anyone have a way to do this?

Thanks you!!!

JDM
 
Reply With Quote
 
 
 
 
Richard McCall [MSFT]
Guest
Posts: n/a
 
      15th Jan 2004
Dim objarg

Dim tDomain

Dim fso

Dim outFile



set objarg = wscript.arguments



If objarg.count = 0 then

Wscript.Echo "Domain Parameter Missing"

Wscript.quit

end if



tdomain = objarg(0)



set oDom = GetObject("WinNT://" & tdomain & ",domain")



oDom.filter = Array("User")



'Instantiate the File System Object

Set fso = CreateObject("Scripting.FileSystemObject")



'Create the output file.

Set outFile = fso.CreateTextFile("C:\accounts.txt")



On Error Resume Next



'Look through each user record

For each oUser in Odom

outFile.WriteLine (oUser.name & vbTab & oUser.AccountDisabled)

next




--
Richard McCall [MSFT]

"This posting is provided "AS IS" with no warranties, and confers no
rights."
"JDM" <(E-Mail Removed)> wrote in message
news:005a01c3db94$1902c300$(E-Mail Removed)...
> Is there a script or command (with the options) for me to be able to
> export all of our disabled user accounts listed in the AD to a file? I
> have played around with CSVDE and cannot seem to get it to work. All
> I need is an exported file with all of our disabled user accounts in it.
>
> does anyone have a way to do this?
>
> Thanks you!!!
>
> JDM



 
Reply With Quote
 
 
 
 
Joe Richards [MVP]
Guest
Posts: n/a
 
      16th Jan 2004
This will locate all disabled users in your forest

adfind -gc -b -bit -f useraccountcontrol:AND:=2 -dn


This will locate all disabled users in a domain

adfind -b dc=domain,dc=com -bit -f useraccountcontrol:AND:=2 -dn


joe


"JDM" <(E-Mail Removed)> wrote in message
news:005a01c3db94$1902c300$(E-Mail Removed)...
> Is there a script or command (with the options) for me to be able to
> export all of our disabled user accounts listed in the AD to a file? I
> have played around with CSVDE and cannot seem to get it to work. All
> I need is an exported file with all of our disabled user accounts in it.
>
> does anyone have a way to do this?
>
> Thanks you!!!
>
> JDM



 
Reply With Quote
 
Joe Richards [MVP]
Guest
Posts: n/a
 
      16th Jan 2004
Oh yeah, adfind can be found at www.joeware.net on the free win32 tools
page.


joe



"JDM" <(E-Mail Removed)> wrote in message
news:005a01c3db94$1902c300$(E-Mail Removed)...
> Is there a script or command (with the options) for me to be able to
> export all of our disabled user accounts listed in the AD to a file? I
> have played around with CSVDE and cannot seem to get it to work. All
> I need is an exported file with all of our disabled user accounts in it.
>
> does anyone have a way to do this?
>
> Thanks you!!!
>
> JDM



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export Distribution List: Full Contact Info Won't Export sbp Microsoft Outlook Contacts 4 26th Mar 2008 08:38 PM
Some info boxes too small to read all info Folk Windows XP General 10 24th Jan 2005 04:12 PM
EXPORT EXPORT EXPORT jubejoie@aol.com Microsoft Access External Data 1 12th May 2004 12:05 AM
Outlook Today - Displaying Exchange Info instead of Personal info Jim Mitchell Microsoft Outlook 1 29th Dec 2003 03:38 AM
__FW: MS's info on Blaster - lots of info and links. READ IT BEFORE POSTING VManes Windows XP General 0 15th Aug 2003 05:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:47 AM.