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.

 


Share this post :

 

Technorati Tags: ,

About these ads
This entry was posted in Powershell. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s