If the number of environments in the tenant is less than 500, use the following script to get all the flows that need licenses across the tenant:
$environments = Get-AdminPowerAppEnvironment
$allFlows = @()
foreach ($env in $environments) {
Write-Host "Getting flows at risk of suspension for environment $($env.DisplayName)..."
$flows = Get-AdminFlowAtRiskOfSuspension -EnvironmentName $env.EnvironmentName
Write-Host "Found $($flows.Count) flows at risk of suspension."
$allFlows += $flows
}
Write all flows to a CSV file
$allFlows | Export-Csv -Path “flows.csv” -NoTypeInformation
Write-Host “All flows at risk of suspension written to flows.csv”
If there are more than 500 environments in the tenant, raise a support ticket with Microsoft and their support team can run the report for you.


Leave a comment