< Back

Stop-AzureRmBackupJob

Tue Jan 29, 2019 9:34 pm

NAME Stop-AzureRmBackupJob



SYNOPSIS

Cancels an existing Backup job.





SYNTAX

Stop-AzureRmBackupJob [-DefaultProfile <IAzureContextContainer>] -Job <AzureRMBackupJob> [<CommonParameters>]



Stop-AzureRmBackupJob [-DefaultProfile <IAzureContextContainer>] -JobID <String> -Vault <AzureRMBackupVault> [<CommonParameters>]





DESCRIPTION

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

activities.



You can cancel only the following types of jobs:



- Backup



- Restore





PARAMETERS

-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Job <AzureRMBackupJob>

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



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-JobID <String>

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



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Vault <AzureRMBackupVault>

Specifies the Backup vault in which this cmdlet cancels a job. To obtain an AzureRmBackupVault object, use the Get-AzureRmBackupVault cmdlet.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

AzureRmBackupJob







OUTPUTS

None







NOTES









Example 1: Stop a backup job by using a job ID



PS C:\\>$Vault = Get-AzureRmBackupVault -Name "Vault03"

PS C:\\> $Job = Get-AzureRmBackupJob -Vault $Vault -Operation Backup

PS C:\\> Stop-AzureRmBackupJob -Vault $Vault -JobID $Job.InstanceId



The first command gets the vault named Vault03 by using the Get-AzureRmBackupVault cmdlet. The command stores that object in the $Vault variable.



The second command gets a backup job from the vault in $Vault by using the Get-AzureRmBackupJob cmdlet. The command stores the job in the $Job

variable. In this example, there is only one backup operation in the specified vault.



The final command stops the job that has the specified ID.





Example 2: Stop all Restore operations



PS C:\\>Get-AzureRmBackupJob -Vault $Vault -Operation Restore | Stop-AzureRmBackupJob



This command gets all the restore operations in the vault in $Vault, and then passes them to the current cmdlet by using the pipeline operator.

The current cmdlet stops each job.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... mbackupjob

Get-AzureRmBackupJob

Get-AzureRmBackupVault

Wait-AzureRmBackupJob