Planner Capacity Management Suite
Professional automation suite for managing Microsoft Planner capacity, licensing, and task workload auditing at enterprise scale.
### FILE: src/Dashboard.php
<?php
// M365 SaaS Engine Dashboard Renderer
$tasks = $ms->graphCall('v1.0/planner/plans/my-plan-id/tasks', $_SESSION['ms_access_token']);
// Render Capacity Overview
echo render_premium_card('Total Overloaded Resources', '14', '+2', 'up', '⚠️', 85);
echo render_premium_card('Avg Capacity Utilization', '78%', '-3', 'down', '📊', 78);
?>
### FILE: scripts/Assign-PlannerLicenses.ps1
<#
.SYNOPSIS
Automates the assignment of Project Premium licenses to users for Planner Capacity View access.
.DESCRIPTION
Validates SKU availability and assigns licenses to a provided list of UPNs.
.NOTES
Author: Souhaiel Morhag
Company: MSEndpoint.com
Blog: https://msendpoint.com
Academy: https://app.msendpoint.com/academy
LinkedIn: https://linkedin.com/in/souhaiel-morhag
GitHub: https://github.com/Msendpoint
License: MIT
#>
[CmdletBinding(SupportsShouldProcess)]
param([string]$TenantId, [string[]]$UserPrincipalNames)
$ErrorActionPreference = 'Stop'
try {
Connect-MgGraph -TenantId $TenantId -Scopes 'User.ReadWrite.All', 'Organization.Read.All'
$sku = Get-MgSubscribedSku -All | Where-Object { $_.SkuPartNumber -eq 'PROJECTPREMIUM' -and $_.CapabilityStatus -eq 'Enabled' }
foreach ($upn in $UserPrincipalNames) {
$user = Get-MgUser -UserId $upn
Set-MgUserLicense -UserId $user.Id -AddLicenses @{ SkuId = $sku.SkuId } -RemoveLicenses @()
}
} catch {
Write-Error "Fatal error: $($_.Exception.Message)"
}
### FILE: scripts/Audit-TaskEffort.ps1
<#
.SYNOPSIS
Audits Planner tasks for effort and scheduling data.
.DESCRIPTION
Enumerate Planner tasks and flags those missing effort data or schedule dates.
.NOTES
Author: Souhaiel Morhag
Company: MSEndpoint.com
Blog: https://msendpoint.com
Academy: https://app.msendpoint.com/academy
LinkedIn: https://linkedin.com/in/souhaiel-morhag
GitHub: https://github.com/Msendpoint
License: MIT
#>
[CmdletBinding()]
param([string]$TenantId)
try {
Connect-MgGraph -TenantId $TenantId -Scopes 'Group.Read.All', 'Tasks.Read.All'
$groups = Get-MgGroup -Filter "resourceProvisioningOptions/Any(x:x eq 'Team')"
foreach ($group in $groups) {
$plans = Get-MgGroupPlannerPlan -GroupId $group.Id
foreach ($plan in $plans) {
$tasks = Get-MgPlannerPlanTask -PlannerPlanId $plan.Id
$tasks | Select-Object Title, @{N='Effort';E={$_.AdditionalProperties.effort}}
}
}
} catch {
Write-Error "Audit failed: $($_.Exception.Message)"
}
⚠️ Always review and validate PowerShell scripts in a non-production pilot group before tenant-wide deployment.