From 1d77258302f46b16ab4d33ef0c43321ffa7b33d8 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Wed, 7 Jan 2026 17:54:21 +0100 Subject: [PATCH 1/2] Initial commit --- 7-Report/Get-Report.ps1 | 12 ++++++------ docs/wiki/7-Report.md | 7 ++++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/7-Report/Get-Report.ps1 b/7-Report/Get-Report.ps1 index edacf63..c5f2aa5 100644 --- a/7-Report/Get-Report.ps1 +++ b/7-Report/Get-Report.ps1 @@ -131,8 +131,9 @@ $xlsxFileName = "Availability_Report_$timestamp.xlsx" If ($availabilityInfoPath) { # Consider splitting into functions for better readability and maintainability - $reportData = @() + foreach ($path in $availabilityInfoPath) { + $reportData = @() $rawdata = Get-Content $path | ConvertFrom-Json -Depth 10 foreach ($item in $rawdata) { $resourceType = $item.ResourceType @@ -142,7 +143,6 @@ If ($availabilityInfoPath) { If ($item.SelectedRegion.available -eq "true") { $regionAvailability = "Available" } - # if implementedSkus is exists and is not null if ($item.ImplementedSkus -and $item.ImplementedSkus[0] -ne "N/A") { if ( $regionAvailability -eq "Available") { @@ -167,13 +167,13 @@ If ($availabilityInfoPath) { $reportData += $reportItem } } + $WorksheetName = "SvcAvail_$($regionHeader)" + $allProps = Get-Props -data $reportData + $lastColumnNumber = $allProps.Count + New-Worksheet -WorksheetName $WorksheetName -LastColumnNumber $lastColumnNumber -reportData $reportData -startColumnNumber 5 -cellValGreen @("Available", "N/A") -cellValRed @("Not available") -cellValYellow @("NotCoveredByScript") } } -$WorksheetName = "ServiceAvailability" -$allProps = Get-Props -data $reportData -$lastColumnNumber = $allProps.Count -New-Worksheet -WorksheetName $WorksheetName -LastColumnNumber $lastColumnNumber -reportData $reportData -startColumnNumber 5 -cellValGreen @("Available", "N/A") -cellValRed @("Not available") -cellValYellow @("NotCoveredByScript") If ($costComparisonPath) { $rawdata = Get-Content $costComparisonPath | ConvertFrom-Json -Depth 10 diff --git a/docs/wiki/7-Report.md b/docs/wiki/7-Report.md index 0d9e4eb..c32642e 100644 --- a/docs/wiki/7-Report.md +++ b/docs/wiki/7-Report.md @@ -2,7 +2,7 @@ This script generates formatted Excel (`.xlsx`)reports based on the output from the previous check script. The reports provide detailed information for each service, including: -### Service Availability Report +## Service Availability Report - **Resource type** - **Resource count** @@ -32,7 +32,8 @@ These reports help you analyze service compatibility and cost differences across If you have created one or more availability JSON files using the `2-AvailabilityCheck/Get-Region.ps1` script, run the following commands, replacing the path with your actual file path(s): ```powershell -.\Get-Report.ps1 -availabilityInfoPath `@("..\2-AvailabilityCheck\Availability_Mapping_Asia_Pacific.json", "..\2-AvailabilityCheck\Availability_Mapping_Europe.json")` -costComparisonPath "..\3-CostInformation\region_comparison_prices.json" +.\Get-Report.ps1 -availabilityInfoPath `@("..\2-AvailabilityCheck\Availability_Mapping_southeastasia.json", "..\2-AvailabilityCheck\Availability_Mapping_westeurope.json")` -costComparisonPath "..\3-CostInformation\region_comparison_prices.json" ``` -The script generates an `.xlsx` and `.csv` files in the `7-report` folder, named `Availability_Report_CURRENTTIMESTAMP`. + +The script generates an `.xlsx` file in the `7-report` folder, named `Availability_Report_CURRENTTIMESTAMP`. From 2f6cfdf51f34078dc57c0edbbacc1e5d696a039b Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Wed, 7 Jan 2026 18:11:30 +0100 Subject: [PATCH 2/2] Update docs/wiki/7-Report.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/wiki/7-Report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/wiki/7-Report.md b/docs/wiki/7-Report.md index c32642e..d3ce6f6 100644 --- a/docs/wiki/7-Report.md +++ b/docs/wiki/7-Report.md @@ -1,6 +1,6 @@ # 7-Report -This script generates formatted Excel (`.xlsx`)reports based on the output from the previous check script. The reports provide detailed information for each service, including: +This script generates formatted Excel (`.xlsx`) reports based on the output from the previous check script. The reports provide detailed information for each service, including: ## Service Availability Report