Kaffeeundcode
Script Library
PowerShell 11.12.2025

Script Workspace

Get DeletedItems

Review the purpose, inspect the code, then test it safely in your own tenant.

88_Get-DeletedItems.ps1

<#
.SYNOPSIS
    Checks Deleted Items (Recycle Bin) for Directory Objects.
    
.DESCRIPTION
    Requires 'Directory.Read.All' permission.
    
.NOTES
    File Name: 88_Get-DeletedItems.ps1
    Author: Mattia Cirillo
    Version: 1.0
#>

Connect-MgGraph -Scopes "Directory.Read.All"
Get-MgDirectoryDeletedItem -All