Skip to content

Commit 3929058

Browse files
Merge pull request #1789 from kris6673/exclude-list
Chore: Sync product names in ExcludeSkuList.JSON
2 parents 22f6c8e + c17f29e commit 3929058

File tree

2 files changed

+35
-8
lines changed

2 files changed

+35
-8
lines changed

Config/ExcludeSkuList.JSON

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
},
66
{
77
"GUID": "f30db892-07e9-47e9-837c-80727f46fd3d",
8-
"Product_Display_Name": "MICROSOFT FLOW FREE"
8+
"Product_Display_Name": "Microsoft Power Automate Free"
99
},
1010
{
1111
"GUID": "16ddbbfc-09ea-4de2-b1d7-312db6112d70",
12-
"Product_Display_Name": "MICROSOFT TEAMS (FREE)"
12+
"Product_Display_Name": "Microsoft Teams (Free)"
1313
},
1414
{
1515
"GUID": "a403ebcc-fae0-4ca2-8c8c-7a907fd6c235",
16-
"Product_Display_Name": "Power BI (free)"
16+
"Product_Display_Name": "Microsoft Fabric (Free)"
1717
},
1818
{
1919
"GUID": "61e6bd70-fbdb-4deb-82ea-912842f39431",
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"GUID": "338148b6-1b11-4102-afb9-f92b6cdc0f8d",
28-
"Product_Display_Name": "DYNAMICS 365 P1 TRIAL FOR INFORMATION WORKERS"
28+
"Product_Display_Name": "Dynamics 365 P1 Tria for Information Workers"
2929
},
3030
{
3131
"GUID": "fcecd1f9-a91e-488d-a918-a96cdb6ce2b0",
@@ -41,19 +41,19 @@
4141
},
4242
{
4343
"GUID": "606b54a9-78d8-4298-ad8b-df6ef4481c80",
44-
"Product_Display_Name": "Power Virtual Agents Viral Trial"
44+
"Product_Display_Name": "Microsoft Copilot Studio Viral Trial"
4545
},
4646
{
4747
"GUID": "1f2f344a-700d-42c9-9427-5cea1d5d7ba6",
48-
"Product_Display_Name": "MICROSOFT STREAM"
48+
"Product_Display_Name": "Microsoft Stream"
4949
},
5050
{
5151
"GUID": "6470687e-a428-4b7a-bef2-8a291ad947c9",
52-
"Product_Display_Name": "WINDOWS STORE FOR BUSINESS"
52+
"Product_Display_Name": "Windows Store for Business"
5353
},
5454
{
5555
"GUID": "710779e8-3d4a-4c88-adb9-386c958d1fdf",
56-
"Product_Display_Name": "MICROSOFT TEAMS EXPLORATORY"
56+
"Product_Display_Name": "Microsoft Teams Exploratory"
5757
},
5858
{
5959
"GUID": "8c4ce438-32a7-4ac5-91a6-e22ae08d9c8b",
@@ -94,5 +94,9 @@
9494
{
9595
"GUID": "99049c9c-6011-4908-bf17-15f496e6519d",
9696
"Product_Display_Name": "Office 365 Extra File Storage"
97+
},
98+
{
99+
"GUID": "47794cd0-f0e5-45c5-9033-2eb6b5fc84e0",
100+
"Product_Display_Name": "Communications Credits"
97101
}
98102
]

Tools/Update-LicenseSKUFiles.ps1

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,28 @@ foreach ($File in $LicenseJSONFiles) {
5454
Write-Host "Updated $($File.FullName) with new license SKU data." -ForegroundColor Green
5555
}
5656

57+
# Sync ExcludeSkuList.JSON names with the authoritative license data
58+
Set-Location $PSScriptRoot
59+
$ExcludeSkuListPath = Join-Path $PSScriptRoot '..\Config\ExcludeSkuList.JSON'
60+
if (Test-Path $ExcludeSkuListPath) {
61+
Write-Host 'Syncing ExcludeSkuList.JSON product names...' -ForegroundColor Yellow
62+
$GuidToName = @{}
63+
foreach ($license in $LicenseData) {
64+
if (-not $GuidToName.ContainsKey($license.GUID)) {
65+
$GuidToName[$license.GUID] = $license.Product_Display_Name
66+
}
67+
}
68+
$ExcludeSkuList = Get-Content -Path $ExcludeSkuListPath -Encoding utf8 | ConvertFrom-Json
69+
$updatedCount = 0
70+
foreach ($entry in $ExcludeSkuList) {
71+
if ($GuidToName.ContainsKey($entry.GUID) -and $entry.Product_Display_Name -cne $GuidToName[$entry.GUID]) {
72+
$entry.Product_Display_Name = $GuidToName[$entry.GUID]
73+
$updatedCount++
74+
}
75+
}
76+
$ExcludeSkuList | ConvertTo-Json -Depth 100 | Set-Content -Path $ExcludeSkuListPath -Encoding utf8
77+
Write-Host "Updated $updatedCount product names in ExcludeSkuList.JSON." -ForegroundColor Green
78+
}
79+
5780
# Clean up the temporary license SKU CSV file
5881
Remove-Item -Path $TempLicenseDataFile -Force

0 commit comments

Comments
 (0)