Kaffeeundcode
Script Library
PowerShell 01.06.2026

Script Workspace

Detect ShadowIT Apps

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

140_Detect-ShadowIT-Apps.ps1

<#
.SYNOPSIS
    Erkennt neu registrierte Apps (Shadow IT Detection).
    
.DESCRIPTION
    Listet Apps auf, die in den letzten 7 Tagen registriert wurden.
    Erfordert die Berechtigung 'Application.Read.All'.

.NOTES
    File Name: 140_Detect-ShadowIT-Apps.ps1
    Author: Mattia Cirillo
    Version: 1.0
#>

param()

Connect-MgGraph -Scopes "Application.Read.All"
$Date = (Get-Date).AddDays(-7)

Get-MgApplication -All | Where-Object { $_.CreatedDateTime -gt $Date } | Select-Object DisplayName, CreatedDateTime, PublisherDomain