diff --git a/PowerShell/ScubaGear/Modules/CreateReport/CreateReport.psm1 b/PowerShell/ScubaGear/Modules/CreateReport/CreateReport.psm1 index 887d0f2f36..8046c1a064 100644 --- a/PowerShell/ScubaGear/Modules/CreateReport/CreateReport.psm1 +++ b/PowerShell/ScubaGear/Modules/CreateReport/CreateReport.psm1 @@ -182,12 +182,26 @@ function New-Report { # Handle AAD-specific reporting if ($BaselineName -eq "aad") { $ReportHTML = $ReportHTML.Replace("{AADWARNING}", $AADWarning) - $ReportHTML = $ReportHTML.Replace("{CAPTABLES}", "") + + # Create an array of custom objects for each SKU + $LicenseInfoArray = $SettingsExport.license_information | ForEach-Object { + [pscustomobject]@{ + "SKU Part Number" = $_.SkuPartNumber + "Used Licenses" = $_.ConsumedUnits + "Total Licenses" = $_.PrepaidUnits.Enabled + } + } + # Convert the custom objects to an HTML table + $LicenseTable = $LicenseInfoArray | ConvertTo-Html -As Table -Fragment + + # Create a section header for the licensing information + $LicensingHTML = "