# Ensure intune device clean-up rule is configured

Ensure intune device clean-up rule is configured. A Maester check for Intune, Tenant administration.

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

<!-- 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/henrikpiecha" title="Henrik Piecha · Original author"><img src="https://github.com/HenrikPiecha.png" alt="Henrik Piecha" width="28" height="28" loading="lazy" decoding="async" /></a><a class="test-byline-avatar" href="/contributors/merill" title="Merill Fernando · Co-contributor"><img src="https://github.com/merill.png" alt="Merill Fernando" 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/henrikpiecha">Henrik Piecha</a> with 2 co-contributors</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> · Intune · Tenant administration · <a href="/docs/tests">All checks</a></p>

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

## Overview

Ensure device clean-up rule is configured

This test checks if the device clean-up rule is configured.

Set your Intune device cleanup rules to delete Intune MDM enrolled devices that appear inactive, stale, or unresponsive. Intune applies cleanup rules immediately and continuously so that your device records remain current.

#### Remediation action

To enable device clean-up rules:

- Open [Microsoft Intune - Device clean-up rules](https://intune.microsoft.com/?ref=AdminCenter#view/Microsoft_Intune_DeviceSettings/DevicesMenu/~/deviceCleanUp)
  - Or navigate to [Microsoft Intune admin center](https://intune.microsoft.com) > **Devices** > **Organize devices** > **Device clean-up rules**.
- Select **Create**.
- Set **Name** and **Platform**.
- Enter **30 days or more** depending on your organizational needs.
- Click **Next**.
- Click **Create**.

#### Related links

- [Automatically hide devices with cleanup rules](https://learn.microsoft.com/intune/intune-service/remote-actions/devices-wipe#automatically-hide-devices-with-cleanup-rules)

## Details

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

| Field | Value |
| --- | --- |
| Test ID | MT.1053 |
| Severity | Low |
| Suite | Maester |
| Product | Intune |
| Feature | Tenant administration |
| Area | Devices and endpoints |
| Resource type | Tenant |
| User impact | Low |
| Implementation cost | Low |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtManagedDeviceCleanupSettings](https://github.com/maester365/maester/blob/main/tests/maester/intune/Test.MT.1053.ps1) |
| Services | Graph |
| Compatible licenses | INTUNE_A |

</details>

## Source

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