Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Limit-EventLog

Limit-EventLog - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Sets the event log properties that limit the size of the event log and the age of its entries.

Limit-EventLog [-LogName] <string[]> [-ComputerName <string[]>] [-MaximumSize <Int64>] [-OverFlowAction {OverwriteA
sNeeded | OverwriteOlder | DoNotOverwrite}] [-RetentionDays <int>] [-Confirm] [-WhatIf] [<CommonParameters>]

The Limit-EventLog cmdlet sets the maximum size of a classic event log, how long each event must be retained, and w