# Ensure all Recovery Services Vaults have soft delete enabled

Soft delete ensures that backup items and recovery points are retained for a period after deletion.

Source: https://maester.dev/docs/tests/MT.1065

<!-- This file is generated by website/scripts/generate-test-docs.mjs. Do not edit manually. -->

<div class="test-byline"><div class="test-byline-avatars"><a class="test-byline-avatar test-byline-avatar--author" href="/contributors/brianveldman" title="Beerd Veldman · Original author"><img src="https://github.com/brianveldman.png" alt="Beerd Veldman" width="28" height="28" loading="lazy" decoding="async" /></a><a class="test-byline-avatar" href="/contributors/l-gosling" title="Lukas Gosling · Co-contributor"><img src="https://github.com/l-gosling.png" alt="Lukas Gosling" width="28" height="28" loading="lazy" decoding="async" /></a></div><div class="test-byline-meta"><span class="test-byline-text">Contributed by <a href="/contributors/brianveldman">Beerd Veldman</a> with <a href="/contributors/l-gosling">Lukas Gosling</a></span><a class="test-byline-link" href="/contributors">All contributors →</a></div></div>

<p class="test-part">Part of <a href="/docs/tests/maester">Maester</a> · Azure · Backup · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId MT.1065
```

## Overview

Soft delete ensures that backup items and recovery points are retained for a period after deletion. This protects against accidental or malicious deletion of backups.

Ensure that all Recovery Services Vaults across all subscriptions have soft delete enabled.

### Remediation action

To enable soft delete on a Recovery Services Vault:

1. Go to the [Azure portal](https://portal.azure.com).
2. Navigate to **Recovery Services Vaults**
3. Select the vault and go to **Properties**
4. Under **Soft Delete**, ensure it is set to **Enabled**

Note: New vaults typically have soft delete enabled by default.

### Related links

* [Soft delete for Recovery Services vaults](https://learn.microsoft.com/azure/backup/backup-azure-security-feature-cloud)

## Details

<details>
<summary>Every attribute of this check</summary>

| Field | Value |
| --- | --- |
| Test ID | MT.1065 |
| Severity | High |
| Suite | Maester |
| Product | Azure |
| Feature | Backup |
| Area | Data protection |
| Resource type | AzureResource |
| User impact | Low |
| Implementation cost | Low |
| MITRE ATT&CK | T1490 Inhibit System Recovery, T1485 Data Destruction |
| Supports controls | nist-800-53-r5:CP-9 |
| PowerShell test | [Test-MtVaultSoftDelete](https://github.com/maester365/maester/blob/main/tests/maester/azure/Test.MT.1065.ps1) |
| Services | Azure |

</details>

## Source

- Test: [`tests/maester/azure/Test.MT.1065.ps1`](https://github.com/maester365/maester/blob/main/tests/maester/azure/Test.MT.1065.ps1)
- Documentation: [`tests/maester/azure/Test.MT.1065.md`](https://github.com/maester365/maester/blob/main/tests/maester/azure/Test.MT.1065.md)
