Power shell for Event Archiving

Author Message
flavor4real

  • Total Posts : 11
  • Scores: 0
  • Reward points : 0
  • Joined: 1/13/2011
  • Status: offline
Power shell for Event Archiving Thursday, January 13, 2011 2:11 PM (permalink)
0
Hello,
I've posted in the VB area about a VB script which supposed to be located at one dedicated server.  this VB script supposed to pull the event logs from other servers, save them on the dedicated server by servername then date, and then clear the event logs on these servers.
 
I was wondering if there is a easy option with powershell?
 
Thx
 
#1
    ebgreen

    • Total Posts : 8227
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    Re:Power shell for Event Archiving Friday, January 14, 2011 3:38 AM (permalink)
    0
    I would expect it to be much simpler in Powershell. What have you tried so far?
    "... 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
     
    #2
      flavor4real

      • Total Posts : 11
      • Scores: 0
      • Reward points : 0
      • Joined: 1/13/2011
      • Status: offline
      Re:Power shell for Event Archiving Wednesday, January 19, 2011 4:20 AM (permalink)
      0
      Hello,
      sorry for responding so late to your post.  I've tried so many VB's out and they just don't work.  Well, I'm new with PS so I just tried my first script out.  I can't copy/past in here.  I basically went to the Script Center Repository at microsoft and search for one.  Do you have anything that might work?
      
       
      
       
      #3
        nirvana

        • Total Posts : 16
        • Scores: 4
        • Reward points : 0
        • Joined: 3/29/2009
        • Status: offline
        Re:Power shell for Event Archiving Sunday, February 13, 2011 1:19 AM (permalink)
        0
        [datetime]$LogDate="02/13/11"
        [string]$LogName="\\servername\share" + (get-date -format "yyyyMMdd" $LogDate) + ".txt"
        get-eventlog application -after $LogDate -computername "computername" | fl * | out-file $LogName 

        1) Exports application event logs after 13th Feb 2011.
        2) Make sure \\servername\share folder exists.
        3) Replace "computername" by name of computer you want to export logs from.
         
         
        #4

          Online Bookmarks Sharing: Share/Bookmark

          Jump to:

          Current active users

          There are 0 members and 1 guests.

          Icon Legend and Permission

          • 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
          • Read Message
          • Post New Thread
          • Reply to message
          • Post New Poll
          • Submit Vote
          • Post reward post
          • Delete my own posts
          • Delete my own threads
          • Rate post

          2000-2012 ASPPlayground.NET Forum Version 3.9