Sorry For the Long Post:
I am attempting to clean up our Azure account and have a couple of old vaults that are not allowing me to delete them. I have tried a few things but am stuck with some of the responses I am getting from Powershell.
First attempted to delete the vault in the Azure portal and got the following message:
Vault cannot be deleted as there are existing resources within the vault. Please ensure there are no backup items, protected servers or backup management servers associated with this vault. Unregister the following containers associated with this vault before proceeding for deletion :
Did some looking around and Microsoft stated to delete the server from the vault. The server is still online, but the azure backup utility has no way of unregistering itself from the azure account that I could find. I am able to hit a delete button in the portal for the server, but after confirming to delete, it does nothing, and the object remains.
Looked for a PowerShell command and found another post on here:
https://serverfault.com/questions/838463/azure-recoveryservicevault-cant-be-removed/839848#839848
but the first few commands give back an error:
$vault = Get-AzureRmRecoveryServicesVault -Name "My Server Name"
Set-AzureRmRecoveryServicesVaultContext -Vault $vault
Set-AzureRmRecoveryServicesVaultContext : Cannot validate argument on parameter 'Vault'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At line:2 char:48 + Set-AzureRmRecoveryServicesVaultContext -Vault $vault + ~~~~~~ + CategoryInfo : InvalidData: (:) [Set-AzureRmRecoveryServicesVaultContext], ParameterBindingVa lidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Azure.Commands.RecoveryServices.Bac kup.Cmdlets.SetAzureRmRecoveryServicesVaultContext
Another post on technet stated trying a different command if it was an older backup vault, which this is
$vault = Get-AzureRmRecoveryServicesBackupContainer -Name "My Server Name"
Set-AzureRmRecoveryServicesVaultContext -Vault $vault
but, again I get an error:
Get-AzureRmRecoveryServicesBackupContainer : The term 'Get-AzureRmRecoveryServicesBackupContainer' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:10 + $vault = Get-AzureRmRecoveryServicesBackupContainer -Name "WDSE ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-AzureRmR...ackupContainer:String) [], CommandNotFound Exception + FullyQualifiedErrorId : CommandNotFoundException
I have no idea where to go from here and would be grateful for any suggestions.
this is the backup Items that I see in my Portal and options on what to do with them.
Thank You