Actually I have it running now
Instead of Set File = FSO.CreateTextFile("AllLastLogin.txt")
Is there a way I can output to a CSV file instead?-------------------------------- Rob Weatherly -------------------------------- -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, July 14, 2003 4:43 PM To: NT 2000 Discussions Subject: RE: Active Directory query Just a warning this will only find last logins for the DC that you logged into. If you have more then one DC other users may be logging into other DC's and the last login time is not replicated to the other DC's If you only have more than one DC which you should you will want to check each one. I you don't know how to manipulate the script below I may be able to help ya out. shaun gillissen To: "NT 2000 Discussions" <[EMAIL PROTECTED]> cc: (bcc: Shaun Gillissen/ANR/MS/PHILIPS) Subject: RE: Active Directory query Evans Chris - cevans Classification: <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] .com 07/14/2003 04:23 PM Please respond to "NT 2000 Discussions" On Error Resume Next Dim Container Dim ContainerName Dim User Dim File Set FSO = Wscript.CreateObject("Scripting.FileSystemObject") Set File = FSO.CreateTextFile("AllLastLogin.txt") ContainerName = "Your Domain Here" Set Container = GetObject("WinNT://" & ContainerName) Container.Filter = Array("User") For Each User in Container Wscript.Echo User.name & " " & User.LastLogin FILE.Writeline User.name & " Last logged on " & User.LastLogin Next -----Original Message----- From: Weatherly, Rob [mailto:[EMAIL PROTECTED] Sent: Monday, July 14, 2003 3:02 PM To: NT 2000 Discussions Subject: Active Directory query Does any one have a script or know where I can find a script that will show me users that have not logged on in the last 30 days Must work on windows 2000 with active directory -------------------------------- Rob Weatherly -------------------------------- ------ You are subscribed as [EMAIL PROTECTED] Web Interface: http://intm-dl.sparklist.com/cgi-bin/lyris.pl?enter=nt2000&text_mode=&la ng=e nglish To unsubscribe send a blank email to %%email.unsub%% ********************************************************************** The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please re-send this communication to the sender and delete the original message or any copy of it from your computer system. Thank You. ------ You are subscribed as [EMAIL PROTECTED] Web Interface: http://intm-dl.sparklist.com/cgi-bin/lyris.pl?enter=nt2000&text_mode=&la ng=english To unsubscribe send a blank email to %%email.unsub%% ------ You are subscribed as [EMAIL PROTECTED] Web Interface: http://intm-dl.sparklist.com/cgi-bin/lyris.pl?enter=nt2000&text_mode=&la ng=english To unsubscribe send a blank email to %%email.unsub%% ------ You are subscribed as [EMAIL PROTECTED] Web Interface: http://intm-dl.sparklist.com/cgi-bin/lyris.pl?enter=nt2000&text_mode=&lang=english To unsubscribe send a blank email to [EMAIL PROTECTED]
