Display: Cloud | List
Most Popular Tags
Results (4 total) All > powershell (x) > system.diagnostics.eventlog (x)
Creating Event Log - Sample usihng PowerShell (EventLog Constructor (String, String) (System.Diagnostics))
<#.SYNOPSIS Creates a new Event Log.DESCRIPTION This script first checks to see if a log called NewPSHLog exists. if not, it creates it then exits. if the log exists, the script writes an entry ot the log and then displays the log entries. A separate script clears and deletes the log!.NOTES File Name : New-CustomEventLog.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires
Last modified by Thomas Lee on 10/29/2010 3:51:17 PM
EventLog sample - recoded in PowerShell (EventLog Class (System.Diagnostics))
<.SYNOPSIS Creates a new Event Log.DESCRIPTION This script first checks to see if a log called NewPSHLog exists. if not, it creates it then exits. if the log exists, the script writes an entry ot the log and then displays the log entries. A separate script clears and deletes the log!.NOTES File Name : New-CustomEventLog.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires
Last modified by Thomas Lee on 11/10/2011 3:50:41 PM
How to: Delete Event Logs in PowerShell (How to: Delete Event Logs)
This is the easiest way I've found to delete a log ad hoc. Great for cleaning up toy logs you create for tests. Just fire up PowerShell, and at the command prompt execute:[system.diagnostics.eventlog]::Delete("MyCustomLog")
Last modified by Mr. V on 10/22/2009 6:29:16 PM
How To: Delete Event Logs using PowerShell (How to: Delete Event Logs)
PowerShell is the easiest tool I've found for deleting a log, such as a test log produced when testing the logging facility. All you need to do is execute one command:[system.diagnostics.eventlog]::Delete("MyCustomLog")If you just want to clean up the various logs created for testing, this is a snap.
Last modified by Mr. V on 10/22/2009 4:04:28 PM
Page view tracker