From 73652e164b51c04edf905b79444cffd436141fa3 Mon Sep 17 00:00:00 2001 From: Toby Williams Date: Thu, 31 Aug 2023 00:45:44 +0100 Subject: [PATCH] Update license skus and products --- CHANGELOG.md | 7 +++++++ PSGSuite/PSGSuite.psd1 | 2 +- PSGSuite/Private/LicenseHelpers.ps1 | 4 ++-- PSGSuite/Public/Licensing/Get-GSUserLicense.ps1 | 1 + README.md | 6 ++++++ 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a223835..53a99b5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ * [PSGSuite - ChangeLog](#psgsuite---changelog) + * [2.36.7](#2367) * [2.36.6 - 2021-06-06](#2366---2021-06-06) * [2.36.5 - 2020-11-01](#2365---2020-11-01) * [2.36.4 - 2020-03-20](#2364---2020-03-20) @@ -113,6 +114,12 @@ # PSGSuite - ChangeLog +## 2.36.7 + +* [Issue #374](https://github.com/SCRT-HQ/PSGSuite/issues/374) + * Updated license products and SKUs as per https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + * Fixed bug where no response was returned by Get-GSUserLicense if 'checkall' param not passed and a matching license was found. + ## 2.36.6 - 2021-06-06 * [Issue #344](https://github.com/SCRT-HQ/PSGSuite/issues/344) diff --git a/PSGSuite/PSGSuite.psd1 b/PSGSuite/PSGSuite.psd1 index af23d76c..937e3e4e 100644 --- a/PSGSuite/PSGSuite.psd1 +++ b/PSGSuite/PSGSuite.psd1 @@ -12,7 +12,7 @@ RootModule = 'PSGSuite.psm1' # Version number of this module. - ModuleVersion = '2.36.6' + ModuleVersion = '2.36.7' # ID used to uniquely identify this module GUID = '9d751152-e83e-40bb-a6db-4c329092aaec' diff --git a/PSGSuite/Private/LicenseHelpers.ps1 b/PSGSuite/Private/LicenseHelpers.ps1 index 503973ea..d8fa0f44 100644 --- a/PSGSuite/Private/LicenseHelpers.ps1 +++ b/PSGSuite/Private/LicenseHelpers.ps1 @@ -1,9 +1,9 @@ function Get-LicenseSkus { - ConvertFrom-Json '{"Google-Drive-storage-1TB": {"product": "Google-Drive-storage", "displayName": "Google Drive Storage 1TB", "aliases": ["drive1tb", "1tb", "googledrivestorage1tb"]}, "Google-Apps-For-Government": {"product": "Google-Apps", "displayName": "G Suite Government", "aliases": ["gafg", "gsuitegovernment", "gsuitegov"]}, "Google-Vault": {"product": "Google-Vault", "displayName": "Google Vault", "aliases": ["vault", "googlevault"]}, "Google-Drive-storage-8TB": {"product": "Google-Drive-storage", "displayName": "Google Drive Storage 8TB", "aliases": ["drive8tb", "8tb", "googledrivestorage8tb"]}, "Google-Drive-storage-400GB": {"product": "Google-Drive-storage", "displayName": "Google Drive Storage 400GB", "aliases": ["drive400gb", "400gb", "googledrivestorage400gb"]}, "Google-Drive-storage-16TB": {"product": "Google-Drive-storage", "displayName": "Google Drive Storage 16TB", "aliases": ["drive16tb", "16tb", "googledrivestorage16tb"]}, "1010340002": {"product": "101034", "displayName": "G Suite Business Archived", "aliases": ["gsbau", "businessarchived", "gsuitebusinessarchived"]}, "1010340001": {"product": "101034", "displayName": "G Suite Enterprise Archived", "aliases": ["gseau", "enterprisearchived", "gsuiteenterprisearchived"]}, "Google-Drive-storage-50GB": {"product": "Google-Drive-storage", "displayName": "Google Drive Storage 50GB", "aliases": ["drive50gb","50gb", "googledrivestorage50gb"]}, "Google-Apps": {"product": "Google-Apps", "displayName": "G Suite Free/Standard", "aliases": ["standard", "free"]}, "Google-Drive-storage-4TB": {"product": "Google-Drive-storage", "displayName": "Google Drive Storage 4TB", "aliases": ["drive4tb", "4tb", "googledrivestorage4tb"]}, "Google-Drive-storage-2TB": {"product": "Google-Drive-storage", "displayName": "Google Drive Storage 2TB", "aliases": ["drive2tb", "2tb", "googledrivestorage2tb"]}, "Google-Apps-For-Postini": {"product": "Google-Apps", "displayName": "G Suite Message Security", "aliases": ["gams", "postini", "gsuitegams", "gsuitepostini", "gsuitemessagesecurity"]}, "Google-Apps-Unlimited": {"product": "Google-Apps", "displayName": "G Suite Business", "aliases": ["gau", "gsb", "unlimited", "gsuitebusiness"]}, "Google-Drive-storage-200GB": {"product": "Google-Drive-storage", "displayName": "Google Drive Storage 200GB", "aliases": ["drive200gb", "200gb", "googledrivestorage200gb"]}, "1010010001": {"product": "101001", "displayName": "Cloud Identity", "aliases": ["identity", "cloudidentity"]}, "Google-Coordinate": {"product": "Google-Coordinate", "displayName": "Google Coordinate", "aliases": ["coordinate", "googlecoordinate"]}, "1010330002": {"product": "101033", "displayName": "Google Voice Premier", "aliases": ["gvpremier", "voicepremier", "googlevoicepremier"]}, "1010330003": {"product": "101033", "displayName": "Google Voice Starter", "aliases": ["gvstarter", "voicestarter", "googlevoicestarter"]}, "1010330004": {"product": "101033", "displayName": "Google Voice Standard", "aliases": ["gvstandard", "voicestandard", "googlevoicestandard"]}, "Google-Vault-Former-Employee": {"product": "Google-Vault", "displayName": "Google Vault Former Employee", "aliases": ["vfe", "googlevaultformeremployee"]}, "Google-Apps-For-Business": {"product": "Google-Apps", "displayName": "G Suite Basic", "aliases": ["gafb", "gafw", "basic", "gsuitebasic"]}, "1010060001": {"product": "Google-Apps", "displayName": "Drive Enterprise", "aliases": ["d4e", "driveenterprise", "drive4enterprise"]}, "1010020020": {"product": "Google-Apps", "displayName": "G Suite Enterprise", "aliases": ["gae", "gse", "enterprise", "gsuiteenterprise"]}, "Google-Apps-Lite": {"product": "Google-Apps", "displayName": "G Suite Lite", "aliases": ["gal", "gsl", "lite", "gsuitelite"]}, "1010050001": {"product": "101005", "displayName": "Cloud Identity Premium", "aliases": ["identitypremium", "cloudidentitypremium"]}, "1010310002": {"product": "101031", "displayName": "G Suite Enterprise for Education", "aliases": ["gsefe", "e4e", "gsuiteenterpriseeducation"]}, "1010310003": {"product": "101031", "displayName": "G Suite Enterprise for Education Student", "aliases": ["gsefes", "e4es", "gsuiteenterpriseeducationstudent"]}, "Google-Chrome-Device-Management": {"product": "Google-Chrome-Device-Management", "displayName": "Google Chrome Device Management", "aliases": ["chrome", "cdm", "googlechromedevicemanagement"]}, "Google-Drive-storage-20GB": {"product": "Google-Drive-storage", "displayName": "Google Drive Storage 20GB", "aliases": ["drive20gb", "20gb", "googledrivestorage20gb"]}}' + ConvertFrom-Json '{"1010010001":{"aliases":["identity","cloudidentity","ci"],"displayName":"Cloud Identity","product":"101001"},"1010020020":{"aliases":["gae","gse","enterprise","gsuiteenterprise","gwep","enterpriseplus"],"displayName":"Google Workspace Enterprise Plus","product":"Google-Apps"},"1010020025":{"aliases":["gwbp","businessplus"],"displayName":"Google Workspace Business Plus","product":"Google-Apps"},"1010020026":{"aliases":["gwestandard","enterprisestandard"],"displayName":"Google Workspace Enterprise Standard","product":"Google-Apps"},"1010020027":{"aliases":["gwbstarter","businessstarter"],"displayName":"Google Workspace Business Starter","product":"Google-Apps"},"1010020028":{"aliases":["gwbstandard","businessstandard"],"displayName":"Google Workspace Business Standard","product":"Google-Apps"},"1010020029":{"aliases":["gwestarter","enterprisestarter"],"displayName":"Google Workspace Enterprise Starter","product":"Google-Apps"},"1010020030":{"aliases":["gwfstarter","frontlinestarter"],"displayName":"Google Workspace Frontline Starter","product":"Google-Apps"},"1010020031":{"aliases":["gwfstandard","frontlinestandard"],"displayName":"Google Workspace Frontline Standard","product":"Google-Apps"},"1010050001":{"aliases":["identitypremium","cloudidentitypremium","cip"],"displayName":"Cloud Identity Premium","product":"101005"},"1010060001":{"aliases":["gwe","essentials"],"displayName":"Google Workspace Essentials","product":"Google-Apps"},"1010060003":{"aliases":["gwee","enterpriseessentials"],"displayName":"Google Workspace Enterprise Essentials","product":"Google-Apps"},"1010060005":{"aliases":["gwep","essentialsplus"],"displayName":"Google Workspace Essentials Plus","product":"Google-Apps"},"1010310002":{"aliases":["gsefe","e4e","gsuiteenterpriseeducation","gwepl"],"displayName":"Google Workspace for Education Plus - Legacy","product":"101031"},"1010310003":{"aliases":["gsefes","e4es","gsuiteenterpriseeducationstudent","gweplstudent"],"displayName":"Google Workspace for Education Plus - Legacy (Student)","product":"101031"},"1010310005":{"aliases":["gwes","educationstandard"],"displayName":"Google Workspace for Education Standard","product":"101031"},"1010310006":{"aliases":["gwesstaff","educationstandardstaff"],"displayName":"Google Workspace for Education Standard (Staff)","product":"101031"},"1010310007":{"aliases":["gwesstudent","educationstandardstudent"],"displayName":"Google Workspace for Education Standard (Extra Student)","product":"101031"},"1010310008":{"aliases":["gwep","educationplus"],"displayName":"Google Workspace for Education Plus","product":"101031"},"1010310009":{"aliases":["gwepstaff","educationplusstaff"],"displayName":"Google Workspace for Education Plus (Staff)","product":"101031"},"1010310010":{"aliases":["gwepstudent","educationplusstudent"],"displayName":"Google Workspace for Education Plus (Extra Student)","product":"101031"},"1010330002":{"aliases":["gvpremier","voicepremier","googlevoicepremier"],"displayName":"Google Voice Premier","product":"101033"},"1010330003":{"aliases":["gvstarter","voicestarter","googlevoicestarter"],"displayName":"Google Voice Starter","product":"101033"},"1010330004":{"aliases":["gvstandard","voicestandard","googlevoicestandard"],"displayName":"Google Voice Standard","product":"101033"},"1010340001":{"aliases":["gseau","enterprisearchived","gsuiteenterprisearchived","gweparchived","enterpriseplusarchived"],"displayName":"Google Workspace Enterprise Plus - Archived User","product":"101034"},"1010340002":{"aliases":["gsbau","businessarchived","gsuitebusinessarchived","gsba"],"displayName":"G Suite Business - Archived User","product":"101034"},"1010340003":{"aliases":["gwbparchived","businessplusarchived"],"displayName":"Google Workspace Business Plus - Archived User","product":"101034"},"1010340004":{"aliases":["gwesarchived","enterprisestandardarchived"],"displayName":"Google Workspace Enterprise Standard - Archived User","product":"101034"},"1010340005":{"aliases":["gwbstarterarchived","businessstarterarchived"],"displayName":"Google Workspace Business Starter - Archived User","product":"101034"},"1010340006":{"aliases":["gwbstandardarchived","businessstandardarchived"],"displayName":"Google Workspace Business Standard - Archived User","product":"101034"},"1010370001":{"aliases":["gwetlu","educationteachlearnupgrade"],"displayName":"Google Workspace for Education: Teaching and Learning Upgrade","product":"101037"},"1010380001":{"aliases":["asc","appsheetcore"],"displayName":"AppSheet Core","product":"101038"},"1010380002":{"aliases":["ases","appsheetenterprisestandard"],"displayName":"AppSheet Enterprise Standard","product":"101038"},"1010380003":{"aliases":["ases2","appsheetenterprisestandard2"],"displayName":"AppSheet Enterprise Standard - 2","product":"101038"},"Google-Apps-Unlimited":{"aliases":["gau","gsb","unlimited","gsuitebusiness"],"displayName":"G Suite Business","product":"Google-Apps"},"Google-Apps-For-Business":{"aliases":["gafb","gafw","basic","gsuitebasic"],"displayName":"G Suite Basic","product":"Google-Apps"},"Google-Apps-Lite":{"aliases":["gal","gsl","lite","gsuitelite"],"displayName":"G Suite Lite","product":"Google-Apps"},"Google-Apps-For-Postini":{"aliases":["gams","postini","gsuitegams","gsuitepostini","gsuitemessagesecurity"],"displayName":"Google Apps Message Security","product":"Google-Apps"},"Google-Apps-For-Education":{"aliases":["gwef","educationfundamentals"],"displayName":"Google Workspace for Education Fundamentals","product":"Google-Apps"},"Google-Vault":{"aliases":["vault","googlevault","gv"],"displayName":"Google Vault","product":"Google-Vault"},"Google-Vault-Former-Employee":{"aliases":["vfe","googlevaultformeremployee","gvfe"],"displayName":"Google Vault Former Employee","product":"Google-Vault"}}' } function Get-LicenseProducts { - ConvertFrom-Json '{"Google-Vault": "Google Vault", "Google-Drive-storage": "Google Drive Storage", "Google-Coordinate": "Google Coordinate", "101034": "G Suite Archived", "101033": "Google Voice", "Google-Apps": "G Suite", "101031": "G Suite Enterprise for Education", "101006": "Drive Enterprise", "Google-Chrome-Device-Management": "Google Chrome Device Management", "101005": "Cloud Identity Premium", "101001": "Cloud Identity Free"}' + ConvertFrom-Json '{"101001":"Cloud Identity","101005":"Cloud Identity Premium","101031":"Google Workspace for Education","101033":"Google Voice","101034":"Google Workspace Archived User","101037":"Google Workspace for Education","101038":"AppSheet","Google-Apps":"Google Workspace","Google-Vault":"Google Vault"}' } function Get-LicenseProductHash { diff --git a/PSGSuite/Public/Licensing/Get-GSUserLicense.ps1 b/PSGSuite/Public/Licensing/Get-GSUserLicense.ps1 index 7a216dbe..3acc0916 100644 --- a/PSGSuite/Public/Licensing/Get-GSUserLicense.ps1 +++ b/PSGSuite/Public/Licensing/Get-GSUserLicense.ps1 @@ -123,6 +123,7 @@ function Get-GSUserLicense { catch {} if (-not $CheckAll -and $response) { $matchedLicense = $true + $response break } elseif ($response) { diff --git a/README.md b/README.md index 243017a3..5bab995a 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,12 @@ All other functions are either intact or have an alias included to support backw [Full CHANGELOG here](https://github.com/scrthq/PSGSuite/blob/master/CHANGELOG.md) +#### 2.36.7 + +* [Issue #374](https://github.com/SCRT-HQ/PSGSuite/issues/374) + * Updated license products and SKUs as per https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + * Fixed bug where no response was returned by Get-GSUserLicense if 'checkall' param not passed and a matching license was found. + #### 2.36.4 - 2020-03-20 * [Issue #270](https://github.com/scrthq/PSGSuite/issues/270)