Contact Info

Crumbtrail » Administration » Powershell » Powershell 3.0 » Limit-EventLog

Limit-EventLog - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »


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 <OverflowAction
>] [-RetentionDays <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]

The Limit-EventLog cmdlet sets the maximum size of a classic event log, how long each event must be retained, and what 
happens when the log reaches its maximum size. You can use it to limit the event logs on local or remote computers.

The cmdlets that contain the EventLog noun (the EventLog cmdlets) work only on classic event logs. To get events from l
ogs that use the Windows Event Log technology in Windows Vista and later versions of Windows, use Get-WinEvent.