dlm-diagnostics
Skill9 starsChanged 8 months agoMITView on GitHub
Diagnose Microsoft Purview Data Lifecycle Management (DLM) issues in Exchange Online. Use this skill when a user reports: retention policy not applying to workloads, retention policy stuck in Error or PendingDeletion, items not moving from primary mailbox to archive, auto-expanding archive not provisioning additional storage, inactive mailbox not created after user deletion, Recoverable Items or SubstrateHolds folder growing uncontrollably, Teams messages not being deleted after retention period expires, MRM and Purview retention conflicting causing unexpected deletion or retention, adaptive scope including wrong members or not populating, or auto-apply retention labels not labeling content or showing Off Error status. Requires Exchange Online and Security & Compliance PowerShell sessions.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- asklearnSkill
- dlm-diagnosticsSkill
- skill-creatorSkill
- asklearnSkill
- skill-creatorSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Before running any diagnostic commands, ensure both PowerShell sessions are connected:
- Distinctive: line 43
If the issue does not match a specific symptom above, or for ad-hoc investigations, see diagnostic-commands.md for a quick-reference of …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
DLM Diagnostics
Investigate and resolve Microsoft Purview Data Lifecycle Management issues in Exchange Online. Follow the decision tree below to identify the correct troubleshooting guide, then load the matching reference file for step-by-step diagnostic instructions.
Prerequisites
Before running any diagnostic commands, ensure both PowerShell sessions are connected:
Connect-ExchangeOnline -UserPrincipalName '<admin@contoso.com>' -ShowBanner:$false
Connect-IPPSSession -UserPrincipalName '<admin@contoso.com>' -ShowBanner:$falseSafety Rules
Only execute read-only commands. Allowed cmdlet verbs: Get-*, Test-*, Export-*.
Never execute mutating commands — Set-*, New-*, Remove-*, Enable-*, Start-*, Invoke-* cmdlets must only be returned as text recommendations for the admin to review and run manually.
Decision Tree
Identify the reported symptom and load the matching reference:
| Symptom | Reference |
| Policy shows Success but content is not retained or deleted on target workloads | retention-policy-not-applying.md |
| Policy status shows Error, PolicySyncTimeout, or PendingDeletion | policy-stuck-error.md |
| Archive mailbox exists but items stay in the primary mailbox | items-not-moving-to-archive.md |
| Archive is near 100 GB but no auxiliary archive is being created | auto-expanding-archive.md |
| User was deleted but mailbox was purged instead of becoming inactive | inactive-mailbox.md |
| Recoverable Items folder growing uncontrollably or SubstrateHolds is large | substrateholds-quota.md |
| Teams retention policy exists but messages remain visible past retention period | teams-messages-not-deleting.md |
| Both MRM and Purview retention on a mailbox causing unexpected behavior | mrm-purview-conflict.md |
| Adaptive scope includes wrong members, shows no members, or scope query not targeting correct users/sites | adaptive-scope.md |
| Auto-apply retention label policy not labeling content, stuck in simulation, or shows "Off (Error)" | auto-apply-labels.md |
| SharePoint site cannot be deleted because a retention policy or hold is blocking it | sharepoint-site-deletion-blocked.md |
If the issue does not match a specific symptom above, or for ad-hoc investigations, see diagnostic-commands.md for a quick-reference of common diagnostic commands. For adaptive scope validation commands, see adaptive-scope.md.
Workflow
- Identify the symptom from the user's description using the decision tree above.
- Load the matching reference file — read it fully before starting the investigation.
- Execute diagnostic commands step by step using the
run_powershellMCP tool, following the reference guide's sequence. - Interpret results at each step — the reference guide explains what to look for and how each finding maps to a root cause.
- Cross-reference — some guides link to sibling references (e.g., policy distribution failures link to policy-stuck-error.md). Load those when directed.
- Report findings — summarize the root cause, present the root-cause confirmation table, and provide the recommended remediation actions as text for the admin to review.
- Review the execution log — use the
get_execution_logMCP tool to include a full audit trail of all commands run during the investigation.
Output Format
Present findings to the user in this structure:
## Investigation Summary
**Symptom:** <what was reported>
**Mailbox/Policy:** <target>
## Diagnostic Steps
✅/❌ Step N — <step name>
Finding: <what was found>
Command: <command that was run>
## Root Cause
<identified root cause from the reference guide's root-cause table>
## Recommended Actions
⚠️ These commands are NOT executed automatically. Review and run manually:
- <remediation command 1>
- <remediation command 2>Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

