Stop-​Azure​Rm​Recovery​Services​Backup​Job

Cancels a running job.

Syntax

Stop-AzureRmRecoveryServicesBackupJob
    [-JobId] <String>
    [-InformationAction <ActionPreference>]
    [-InformationVariable <String>]
    [<CommonParameters>]
Stop-AzureRmRecoveryServicesBackupJob
    [-Job] <JobBase>
    [-InformationAction <ActionPreference>]
    [-InformationVariable <String>]
    [<CommonParameters>]

Description

The Stop-AzureRmRecoveryServicesBackupJob cmdlet cancels an existing Azure Backup job. Use this cmdlet to stop a job that takes too long and blocks other activities.

You can cancel only Backup and Restore job types.

Set the vault context by using the Set-AzureRmRecoveryServicesVaultContext cmdlet before you use the current cmdlet.

Examples

Example 1: Stop a backup job

PS C:\>$Job = Get-AzureRmRecoveryServicesBackupJob -Operation Backup
PS C:\> Stop-AzureRmRecoveryServicesBackupJob -JobID $Job.InstanceId

The first command gets a backup job, and then stores the job in the $Job variable.

The last command stops the job by specifying the Instance ID of the backup job in $Job.

Required Parameters

-Job

Specifies a job that this cmdlet cancels. To obtain a BackupJob object, use the Get-AzureRmRecoveryServicesBackupJob cmdlet.

Type:JobBase
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobId

Specifies the ID of the job to cancel. The ID is the InstanceId property of a BackupJob object. To obtain an BackupJob object, use Get-AzureRmRecoveryServicesBackupJob.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False