Share via


LimitEventLogCommand.RetentionDays Property

Gets and sets the value of the RetentionDays parameter of the Limit-EventLog cmdlet. This property is introduced in Windows PowerShell 2.0.

Namespace: Microsoft.PowerShell.Commands
Assembly: Microsoft.PowerShell.Commands.Management (in Microsoft.PowerShell.Commands.Management.dll)

Usage

'Usage
Dim instance As LimitEventLogCommand
Dim value As Integer

value = instance.RetentionDays

instance.RetentionDays = value

Syntax

'Declaration
<AliasAttribute(System.String[])> _
<ValidateRangeAttribute(1, 365)> _
<ValidateNotNullOrEmptyAttribute> _
<ParameterAttribute> _
Public Property RetentionDays As Integer
[AliasAttribute(System.String[])] 
[ValidateRangeAttribute(1, 365)] 
[ValidateNotNullOrEmptyAttribute] 
[ParameterAttribute] 
public int RetentionDays { get; set; }
[AliasAttribute(System.String[])] 
[ValidateRangeAttribute(1, 365)] 
[ValidateNotNullOrEmptyAttribute] 
[ParameterAttribute] 
public:
property int RetentionDays {
    int get ();
    void set (int value);
}
/** @property */
public int get_RetentionDays ()

/** @property */
public void set_RetentionDays (int value)
public function get RetentionDays () : int

public function set RetentionDays (value : int)

Property Value

An Int32 value that represents the minimum number of days that an event must remain in the event log.

Remarks

This topic is included in this SDK for completeness only. For more information about this cmdlet, see Limit-EventLog in the Microsoft TechNet library.

For Help at the command line, type:

get-help limit-eventlog

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

LimitEventLogCommand Class
LimitEventLogCommand Members
Microsoft.PowerShell.Commands Namespace

Other Resources

Windows PowerShell SDK