From dca9ed514caa55ce931efa592cc13e4f2f162095 Mon Sep 17 00:00:00 2001 From: Danny de Kooker Date: Thu, 18 Jul 2024 10:55:32 +0200 Subject: [PATCH] Fixed summary report --- Azure/Azure-Licensing-Report.ps1 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Azure/Azure-Licensing-Report.ps1 b/Azure/Azure-Licensing-Report.ps1 index bde34d3..fb78035 100644 --- a/Azure/Azure-Licensing-Report.ps1 +++ b/Azure/Azure-Licensing-Report.ps1 @@ -30,7 +30,7 @@ $Version = "v1.0" $logfilelocation = "$($MyInvocation.MyCommand.Path | Split-Path -Parent)\Logs" $logfilename = "$(Get-Date -Format yyyyMMddHHmmss)-Azure-Licensing-Report.log" - $summaryfilename = "$(Get-Date -Format yyyyMMddHHmmss)-Azure-Licensing-Report.txt" + $summaryfilename = "$(Get-Date -Format yyyyMMddHHmmss)-Azure-Licensing-Summary.txt" #Azure Enterprise app configuration $STR_TenantID = "" @@ -275,5 +275,14 @@ Write-Summary "Azure Product license report Summary:" Write-Summary "---------------------------" Write-Summary "Report date: $(Get-Date -Format "dd-MM-yyy HH:mm:ss")" - Write-Summary "$($licenseUsageData | Sort-Object -Property LicenseDisplayName)" + foreach ($license in $($licenseUsageData | Sort-Object -Property LicenseDisplayName)){ + Write-Summary "******************" + Write-Summary "License Name: $($licenseUsageObject.LicenseDisplayName)" + Write-Summary "License SKU: $($licenseUsageObject.LicenseSKU)" + Write-Summary "Assigned Licenses: $($licenseUsageObject.AssignedLicenses)" + Write-Summary "Available Licenses: $($licenseUsageObject.AvailableLicenses)" + Write-Summary "Total Licenses: $($licenseUsageObject.TotalLicenses)" + Write-Summary "Status: $($licenseUsageObject.LicenseStatus)" + } + Write-Summary "---------------------------" \ No newline at end of file