Backup Eventlogs to another folder

Ask your Windows PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
schnauzer
Posts: 1
Joined: Mon Oct 08, 2007 4:50 am

Backup Eventlogs to another folder

Post by schnauzer » Tue Apr 15, 2008 2:54 am

We want to provide our developers with access to the Eventlogs with minimal effort. I have tried to use the copy-item commandlet to copy the event logs to another folder that is shared but each time the .evt file is corrupt when you try to open it. Is there a commandlet that will allow me to 'save' the eventlog to another folder?

User avatar
b0n3z
Posts: 10
Joined: Fri Mar 21, 2008 9:39 am

Backup Eventlogs to another folder

Post by b0n3z » Thu May 15, 2008 4:11 am

Schnauzer - do you want to something similar to this?http://www.microsoft.com/technet/script ... mfr=trueIf so we could just modify this to not clear the log and convert it to PowerShell. Would you be running the PowerShell script remotely or as a scheduled event on the workstation that has the logs?Hope this spurs some ideas and helps.-Ken

User avatar
jhicks
Posts: 1789
Joined: Sun Jan 21, 2007 11:31 pm

Backup Eventlogs to another folder

Post by jhicks » Mon Dec 08, 2008 12:12 am

I wrote a backup script for my Practical PowerShell column (http://nexus.realtimepublishers.com/RTWA.htm) that might help. Get the Aug 08 issue. But the backup methods only copy the entire log. Another possibility is to use Get-WMIObject to get the events you want and export the information to an XML file. Or you could convert it to an HTML page.

User avatar
pudding
Posts: 37
Joined: Mon Dec 08, 2008 8:15 am

Backup Eventlogs to another folder

Post by pudding » Thu Dec 11, 2008 8:15 am




Getting Started with PowerShellhttp://synjunkie.blogspot.com/2008/07/powershell.htmlblogger reported that this link is no longer exist.

Locked