Categories

W2KSG: Event Logs

Having realised that most of the folder and file scripts have already been covered in earlier posts in this series I an jumping on again to the event logs in chapter 12

Script Center Home > Microsoft Windows 2000 Scripting Guide > Scripting Solutions for System Administration > Logs > Managing Logs > Managing Event Logs   Retrieving Event Log Properties

Listing 12.1 shows us how to retrieve the properties of the event logs

Get-EventLog -List

Will give us the log name, maximum log size, number of entries and the overflow action when the log is full.  PowerShell needs to be running with elevated privileges (run as admin\ logon as admin) to work with the security log. Pulling the data back with get-eventlog is so easy its not worth thinking about restricting to individual logs so we will skip a few scripts and look next at configuring log properties.

 

 

 

Technorati Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>