external help file: ServerManagement-help.xml Module Name: ServerManagement online version: http://psservermanagement.readthedocs.io/en/latest/functions/Invoke-LogRotation schema: 2.0.0


Register-LogRotationTask

SYNOPSIS

Short description

SYNTAX

Register-LogRotationTask [-Name] <String> [-Path] <String[]> [[-KeepRaw] <Int32>] [-KeepArchives <Int32>]
 [-StartTime <String>] [-Include <String>] [-Exclude <String>] [<CommonParameters>]

DESCRIPTION

Long description

EXAMPLES

EXAMPLE 1

An example

PARAMETERS

-Name

Specifies the name of the scheduled task with ' - LogRotation' appended.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path

Specifies a path to one or more locations. Invoke-LogRotation processes the log files in the specified locations.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeepRaw

Specifies the number of days to keep uncompressed log files. If you do not specify this parameter, the cmdlet will retain 5 days.

Type: Int32
Parameter Sets: (All)
Aliases: CompressDays

Required: False
Position: 4
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-KeepArchives

Specifies the number of months to keep compresses log archives. If you do not specify this parameter, the archives will be retained indefinately.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-StartTime

Specifies the start time for the scheduled task. The default value is 10:00 PM.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 22:00
Accept pipeline input: False
Accept wildcard characters: False

-Include

Specifies a wildcard selection string of files to include.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exclude

Specifies a wildcard selection string of files to exclude.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

General notes