Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


RE: Export Active Directory Users to Excel Worksheet

 
Logged in as: Guest
arrSession:exec spGetSession 2,16,29830
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> RE: Export Active Directory Users to Excel Worksheet
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: <<   < prev  1 2 [3]
Login
Message << Older Topic   Newer Topic >>
 RE: Export Active Directory Users to Excel Worksheet - 7/10/2007 10:56:01 AM   
  edavis6678

 

Posts: 121
Score: 0
Joined: 1/12/2006
Status: offline
I could have done the excel script that way, but the problem with what you are asking is that the what happens when a user is a member of over lets say 100 groups?  (that's why I chose to use Access and just dumped a flat table) - the output would be unreadable and pretty much useless in Excel.  (I limited the smtp address to 10 for this reason)

I'm not sure exactly what you are after, one thought you could do if you want a nice report is use the scipts I wrote for access and then build a query/report  in Access to display what you want.

Ping me via my email if you want some help building a query.

-E




(in reply to kayman)
 
 
Post #: 41
 
 RE: Export Active Directory Users to Excel Worksheet - 8/24/2007 6:47:19 AM   
  knoxvegas

 

Posts: 1
Score: 0
Joined: 8/24/2007
Status: offline
Where do you enter the domain name?  I keep getting that the specified domain does not exist, but I haven't even put in the domain yet. 




thanks.


(in reply to edavis6678)
 
 
Post #: 42
 
 RE: Export Active Directory Users to Excel Worksheet - 8/24/2007 6:51:53 AM   
  edavis6678

 

Posts: 121
Score: 0
Joined: 1/12/2006
Status: offline
Private message me and I can help you offline, but the domain name is obtained by using RootDSE.

The computer running the script MUST be a member of the domain that you are trying to export.

In the script, add the Msgbox like to see what domain name ldap it's getting.

---------------
strDNC = objRoot.Get("DefaultNamingContext")
Set objDomain = GetObject("LDAP://" & strDNC) ' Bind to the top of the Domain using LDAP using ROotDSE
MsgBox strDNC   '<-------------------add this to find out the name it's getting

-----------------


(in reply to knoxvegas)
 
 
Post #: 43
 
 RE: Export Active Directory Users to Excel Worksheet - 11/7/2007 1:31:52 AM   
  ASPiringNut

 

Posts: 1
Score: 0
Joined: 11/7/2007
Status: offline
Thanks for the script.  It works great.

However, I'm trying (VBS newbie) to edit your script to check all domain comtrollers for the Last Login and save the latest.  Can you help?

Thanks.

(in reply to edavis6678)
 
 
Post #: 44
 
 RE: Export Active Directory Users to Excel Worksheet - 1/19/2008 3:38:37 AM   
  surge3333

 

Posts: 1
Score: 0
Joined: 1/19/2008
Status: offline
Great script.....I'm trying to read in a.txt file that contains SamAccountName and run this through your script.....i.e produce an .xls file that contains info for only those listed in my .txt input, vs for everyone in the domain.

I realize this should be prety straight forward....but I just can't seem to get anything to work.

If you have anything to do this it would be most appreaciated.

thks

(in reply to ASPiringNut)
 
 
Post #: 45
 
 RE: Export Active Directory Users to Excel Worksheet - 1/24/2008 11:40:47 AM   
  edavis6678

 

Posts: 121
Score: 0
Joined: 1/12/2006
Status: offline
Been extremely busy at work.

Send me a Priv Message with your email and I can send you soemthing offline

(in reply to surge3333)
 
 
Post #: 46
 
 RE: Export Active Directory Users to Excel Worksheet - 4/1/2008 2:12:24 PM   
  ryosaeba88

 

Posts: 2
Score: 0
Joined: 4/1/2008
Status: offline
The scripts are wonderful!!

However, is there any script to export and import the display name as well?

Thanks!


(in reply to edavis6678)
 
 
Post #: 47
 
 RE: Export Active Directory Users to Excel Worksheet - 4/2/2008 12:49:05 AM   
  ebgreen


Posts: 4408
Score: 29
Joined: 7/12/2005
Status: online
Why not just take the existing one and modify it to include what you want?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ryosaeba88)
 
 
Post #: 48
 
 RE: Export Active Directory Users to Excel Worksheet - 4/5/2008 1:25:54 AM   
  ryosaeba88

 

Posts: 2
Score: 0
Joined: 4/1/2008
Status: offline
quote:

ORIGINAL: ebgreen

Why not just take the existing one and modify it to include what you want?


as i am not newbie of vbscript....

(in reply to ebgreen)
 
 
Post #: 49
 
 RE: Export Active Directory Users to Excel Worksheet - 4/7/2008 12:25:51 AM   
  ebgreen


Posts: 4408
Score: 29
Joined: 7/12/2005
Status: online
That is how you learn.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ryosaeba88)
 
 
Post #: 50
 
 RE: Export Active Directory Users to Excel Worksheet - 5/2/2008 1:51:24 AM   
  soultrain99

 

Posts: 1
Score: 0
Joined: 5/2/2008
Status: offline
Great script to export the user's AD fields.

I tried to make changes to the Excel and tried the IMPORT script.  It logs the changes, but does not actually write back to AD.

I did change
boolCommitFlag = "1"

Any ideas?

(in reply to edavis6678)
 
 
Post #: 51
 
 RE: Export Active Directory Users to Excel Worksheet - 5/4/2008 5:06:40 AM   
  edavis6678

 

Posts: 121
Score: 0
Joined: 1/12/2006
Status: offline
Does your account have Rights to change AD properties?

Are there any errors reported?

(in reply to soultrain99)
 
 
Post #: 52
 
 
Page:  <<   < prev  1 2 [3]
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> RE: Export Active Directory Users to Excel Worksheet Page: <<   < prev  1 2 [3]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts