All scripts
Microsoft 365 101

Get-PowerAppsInventory

Exports every Power App in the tenant with its owner, environment and last modified date, useful for finding orphaned apps built by someone who has since left.

Get-PowerAppsInventory.ps1
<#
.SYNOPSIS
    Exports a full inventory of Power Apps across the tenant.

.DESCRIPTION
    Lists every Power App across all environments with its owner,
    environment name, and last modified date, useful for finding
    orphaned apps built by someone who has since left the organization
    and nobody has claimed ownership of since.

.PARAMETER ExportPath
    Path to write the CSV to. Defaults to the current directory.

.EXAMPLE
    .\Get-PowerAppsInventory.ps1

.NOTES
    Requires the Microsoft.PowerApps.Administration.PowerShell module and
    an active Add-PowerAppsAccount session.

.AUTHOR
    Shehryar Hassan
#>

param(
    [string]$ExportPath = (Get-Location).Path
)

$apps = Get-AdminPowerApp

$report = $apps | Select-Object DisplayName, EnvironmentName, Owner, LastModifiedTime

$file = Join-Path $ExportPath "powerapps-inventory_$(Get-Date -Format yyyyMMdd_HHmmss).csv"
$report | Export-Csv -Path $file -NoTypeInformation
Write-Host "Exported $($report.Count) app(s) to $file" -ForegroundColor Cyan

Read it before you run it, and test in a safe tenant first.