Skip to content

Commit

Permalink
!deploy v2.30.2 with fix for #212
Browse files Browse the repository at this point in the history
## 2.30.2

* [Issue #212](#212)
  * Fixed: Get-GSUserLicense no longer short circuiting after first license match when processing pipeline input
  * Updated: License SKU order to check most common license types first for Get-GSUserLicense, which should result in faster overall processing when working with a large amount of users.
  • Loading branch information
scrthq committed Jul 18, 2019
1 parent 1cca5a3 commit 311afd1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
* [PSGSuite - ChangeLog](#PSGSuite---ChangeLog)
* [2.30.2](#2302)
* [2.30.1](#2301)
* [2.30.0](#2300)
* [2.29.0](#2290)
Expand Down Expand Up @@ -93,6 +94,12 @@

# PSGSuite - ChangeLog

## 2.30.2

* [Issue #212](https://github.com/scrthq/PSGSuite/issues/212)
* Fixed: `Get-GSUserLicense` no longer short circuiting after first license match when processing pipeline input
* Updated: License SKU order to check most common license types first for `Get-GSUserLicense`, which should result in faster overall processing when working with a large amount of users.

## 2.30.1

* Miscellaneous
Expand Down
2 changes: 1 addition & 1 deletion PSGSuite/PSGSuite.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'PSGSuite.psm1'

# Version number of this module.
ModuleVersion = '2.30.1'
ModuleVersion = '2.30.2'

# ID used to uniquely identify this module
GUID = '9d751152-e83e-40bb-a6db-4c329092aaec'
Expand Down
7 changes: 4 additions & 3 deletions PSGSuite/Public/Licensing/Get-GSUserLicense.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function Get-GSUserLicense {
switch ($PSCmdlet.ParameterSetName) {
Get {
foreach ($U in $User) {
$response = $null
if ($U -ceq 'me') {
$U = $Script:PSGSuite.AdminEmail
}
Expand All @@ -116,7 +117,7 @@ function Get-GSUserLicense {
$request.Execute()
}
else {
foreach ($license in (@("Cloud-Identity","Cloud-Identity-Premium","Drive-Enterprise","G-Suite-Enterprise","Google-Apps-Unlimited","Google-Apps-For-Business","Google-Apps-For-Postini","Google-Apps-Lite","Google-Drive-storage-20GB","Google-Drive-storage-50GB","Google-Drive-storage-200GB","Google-Drive-storage-400GB","Google-Drive-storage-1TB","Google-Drive-storage-2TB","Google-Drive-storage-4TB","Google-Drive-storage-8TB","Google-Drive-storage-16TB","Google-Vault","Google-Vault-Former-Employee") | Sort-Object)) {
foreach ($license in (@("G-Suite-Enterprise","Google-Apps-Unlimited","Google-Apps-For-Business","Google-Vault","Google-Vault-Former-Employee","Cloud-Identity","Cloud-Identity-Premium","Drive-Enterprise","Google-Apps-For-Postini","Google-Apps-Lite","Google-Drive-storage-20GB","Google-Drive-storage-50GB","Google-Drive-storage-200GB","Google-Drive-storage-400GB","Google-Drive-storage-1TB","Google-Drive-storage-2TB","Google-Drive-storage-4TB","Google-Drive-storage-8TB","Google-Drive-storage-16TB") | Sort-Object)) {
Write-Verbose "Getting License SKU '$License' for User '$U'"
switch ($License) {
"G-Suite-Enterprise" {
Expand All @@ -143,10 +144,10 @@ function Get-GSUserLicense {
}
}
if (!$response) {
Write-Error "No license found for $U!"
Write-Warning "No license found for $U!"
}
else {
return $response
$response
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.30.2

* [Issue #212](https://github.com/scrthq/PSGSuite/issues/212)
* Fixed: `Get-GSUserLicense` no longer short circuiting after first license match when processing pipeline input
* Updated: License SKU order to check most common license types first for `Get-GSUserLicense`, which should result in faster overall processing when working with a large amount of users.

#### 2.30.1

* Miscellaneous
Expand Down

0 comments on commit 311afd1

Please sign in to comment.