Skip to main content
SnapCenter 4.9 cmdlets

Remove-SmJobs

Contributors

Removes completed jobs.

Syntax

Remove-SmJobs [-JobId]  <Int32>  [-StartTime]  <DateTime>  [-EndTime]  <DateTime>  [-Auth]  <String>

Detailed Description

Removes completed jobs using either the job ID of a specific job or all jobs within a specified date and time.

Parameters

Name Description Required? Pipeline Input Default Value

JobId

Specifies the ID of the job you want to remove.

false

false

StartTime

Specifies that jobs completed after the specified date and time should be removed.

false

false

EndTime

Specifies that jobs completed before the specified date and time should be removed.

false

false

Auth

false

false

Examples

Example 1: Removing a job using a specific job ID

 Remove-SmJobs -JobId 1002

This example syntax removes the job associated with the specified job ID.

Remove-SmJobs
Are you sure want to remove all the jobs(s) ?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y

Example 2: Removing jobs completed within specific start and end dates without a confirm dialogue

 Remove-SmJobs -StartTime 02/12/2015 -EndTime 07/02/2015 -Confirm:$false

This example syntax removes jobs completed between the specified beginning and end dates.