-
Notifications
You must be signed in to change notification settings - Fork 0
SurajSPujari/SQL-AzureBackup-Disable-using-Powershell
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
# SQL-AzureBackup-Disable-using-Powershell #Collection of commands given below will remove Recovery points of all the databases configured under given "server_name". Helpful when you have to disable thousands of DBs coming from a given server without which deleting the server from Server protection will not work. $vault=Get-AzRecoveryServicesVault -name <Vault-Name> Set-AzRecoveryServicesVaultContext -Vault $vault $bkpItem = Get-AzRecoveryServicesBackupItem -BackupManagementType AzureWorkload -WorkloadType MSSQL -VaultId $vault.ID $Item=$bkpItem| Where-Object { $_.ServerName -eq "server_name"} foreach ($i in $Item) { Disable-AzRecoveryServicesBackupProtection -Item $i -VaultId $vault.ID -RemoveRecoveryPoints -Force }
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published