Reputation: 69
In Azure RM Powershell the statement
Remove-AzureRmKeyVault -InputObject $sdvobjKeyVault -Force
always pops up with the prompt whether I really want to execute that action - '-Force' seems to get ignored! Now then, how to have a KV deleted from a RG without user interaction via Azure Powershell?
Upvotes: 0
Views: 382
Reputation: 304
I'm not seeing the same behavior here. Adding -Force suppresses the confirmation as expected.
Any reason you are using the old AzureRm commands? You should start making the move to the Az commands. Here is a good reference for KeyVaults including the ability to manage the Soft Delete for vaults.
MS Docs Reference: https://learn.microsoft.com/en-us/azure/key-vault/key-vault-soft-delete-powershell
Upvotes: 1