-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.26.2 adding features and squashing bugs
## 2.26.2 * [Issue #177](#177) * Added: `Fields` parameter to `Get-GSDriveFileList` * [Issue #178](#178) * Fixed: `Start-GSDriveFileUpload` failing on PowerShell 4.0 * [Issue #179](#179) * Added: `Ims` parameter to both `New-GSUser` and `Update-GSUser` * Added: `Add-GSUserIm` function to create correct type for new `Ims` parameter. * Miscellaneous * Added: `Clear-PSGSuiteServiceCache` to clear the cache and dispose of any remaining open web clients. * Improved overall service caching. * Added: Support for `Cloud-Identity` licenses for `Get-GSUserLicense` * Added: `OutputType` for all applicable Helper functions (i.e. `Add-GSUserIm`)
- Loading branch information
Showing
26 changed files
with
525 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
PSGSuite/Public/Authentication/Clear-PSGSuiteServiceCache.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
function Clear-PSGSuiteServiceCache { | ||
<# | ||
.SYNOPSIS | ||
Clears the dictionary of cached service objects created with New-GoogleService. | ||
.DESCRIPTION | ||
Clears the dictionary of cached service objects created with New-GoogleService. | ||
.EXAMPLE | ||
Clear-PSGSuiteServiceCache | ||
#> | ||
[CmdletBinding()] | ||
Param () | ||
Begin{ | ||
if (-not $script:_PSGSuiteSessions) { | ||
$script:_PSGSuiteSessions = @{} | ||
} | ||
$toRemove = @() | ||
} | ||
Process { | ||
if (-not $script:_PSGSuiteSessions.Keys.Count) { | ||
Write-Verbose "There are no current cached sessions to clear!" | ||
} | ||
else { | ||
foreach ($key in $script:_PSGSuiteSessions.Keys) { | ||
Write-Verbose "Clearing cached session with key: $key" | ||
$script:_PSGSuiteSessions[$key].Service.Dispose() | ||
$toRemove += $key | ||
} | ||
} | ||
} | ||
End { | ||
foreach ($key in $toRemove) { | ||
$script:_PSGSuiteSessions.Remove($key) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.