Created
October 17, 2019 18:50
-
-
Save mattwoolnough/54a7abcbe0f92930d66743c6265b644d to your computer and use it in GitHub Desktop.
Remove Azure Backup and Vault
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$VaultName = "RecoveryVault" | |
$ClientName = "desktop-mw." | |
$MyVault = Get-AzRecoveryServicesVault -ResourceGroupName $ResourceGroupName -Name $VaultName | |
$Cont = Get-AzRecoveryServicesBackupContainer -ContainerType "Windows" -BackupManagementType MARS -FriendlyName $ClientName -VaultId $MyVault.ID | |
Unregister-AzRecoveryServicesBackupContainer -Container $Cont | |
Get-AzRecoveryServicesVault -ResourceGroupName $ResourceGroupName -Name $VaultName | Remove-AzRecoveryServicesVault |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment