Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Delete accounts and create an event log

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Delete accounts and create an event log
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Delete accounts and create an event log - 6/14/2007 6:06:57 AM   
  aburt

 

Posts: 104
Score: 0
Joined: 12/4/2006
Status: offline
I have a script that remove all accounts (except for a select few) from the admin group.  Then the script writes the to event log which accounts were removed.   However, when the event log entries are created, It creates on event log per account deleted. I was wondering is there a way to get one event log entry for all accounts removed. 


      
 
 
Post #: 1
 
 RE: Delete accounts and create an event log - 6/14/2007 11:43:52 AM   
  dm_4ever


Posts: 2664
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
Define a variable that will hold all the messages for you until the end and then write to it once.

If....
   strEvtMsg = strEvtMsg & "Failed to remove...." & vbCrLf
   ..code
Else
   strEvtMsg = strEvtMsg & "Removed...." & vbCrLf
End If

..code

WriteLog strEvtMsg

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to aburt)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Delete accounts and create an event log Page: [1]
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