external help file | Module Name | online version | schema |
---|---|---|---|
ScheduledJobTools-help.xml |
ScheduledJobTools |
2.0.0 |
Remove old job results
Remove-OldJobResult [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-OldJobResult [-ScheduledJob] <ScheduledJobDefinition> [-WhatIf] [-Confirm] [<CommonParameters>]
Use this command to remove all but the most recent scheduled job result.
PS C:\> Remove-OldJobResult -name DailyBackup
Remove all the but the most recent result for the DailyBackup job.
PS C:\> Get-ScheduledJob | Remove-OldJobResult
Get all scheduled jobs and pipe them to this command to delete all but the most recent result.
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The name of a scheduled job.
Type: String[]
Parameter Sets: name
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
A scheduled job object.
Type: ScheduledJobDefinition
Parameter Sets: job
Aliases: job
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/