diff --git a/CHANGELOG.md b/CHANGELOG.md index c1240fd2..75f36ca6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ * [PSGSuite - ChangeLog](#psgsuite---changelog) + * [2.36.0 - 2020-02-28](#2360---2020-02-28) * [2.35.1 - 2019-12-29](#2351---2019-12-29) * [2.35.0 - 2019-12-29](#2350---2019-12-29) * [2.34.0 - 2019-11-02](#2340---2019-11-02) @@ -106,6 +107,26 @@ # PSGSuite - ChangeLog +## 2.36.0 - 2020-02-28 + +* [PR #255](https://github.com/scrthq/PSGSuite/pull/255) - _Thanks, [@FISHMANPET](https://github.com/FISHMANPET)!_ + * Added support for `[ScriptBlock]` values on the config, allowing you to provide a script to run that will pull in a configuration value (vs embedded the value directly on the config) +* [PR #255](https://github.com/scrthq/PSGSuite/pull/260) - _Thanks, [@vaskotoo](https://github.com/vaskotoo)!_ + * Added support for an array of Users on `Get-GSGmailMessageList` +* [PR #261](https://github.com/scrthq/PSGSuite/issues/261) - _Thanks, [@Foggy2](https://github.com/Foggy2)!_ + * Added support for all license types including undocumented ones. + * Closed out [Issue #252](https://github.com/scrthq/PSGSuite/issues/252) as well. +* [PR #262](https://github.com/scrthq/PSGSuite/issues/262) - _Thanks, [@nwls-hermesj](https://github.com/nwls-hermesj)!_ + * Added support for pipeline input of Drive file objects to `Remove-GSDriveFile`. +* [Issue #256](https://github.com/scrthq/PSGSuite/issues/256) + * Cleaned up docs on `Send-GSChatMessage`. +* [Issue #258](https://github.com/scrthq/PSGSuite/issues/258) + * Removed URL Shortener functions due to Google deprecation. +* [Issue #263](https://github.com/scrthq/PSGSuite/issues/263) + * Fixed `[SecureString]` decryption on Unix machines running PowerShell 7 +* Miscellaneous + * Removed the Tasks API functions. Google has not pushed an update to the Tasks .NET SDK in over 2 months, so it is now behind the current release versions of the core Google.Apis assemblies, resulting in failure to import. + ## 2.35.1 - 2019-12-29 * [Issue #57](https://github.com/scrthq/PSGSuite/issues/57) diff --git a/PSGSuite/Public/Tasks/Clear-GSTasklist.ps1 b/DeprecatedFunctions/Tasks/Clear-GSTasklist.ps1 similarity index 100% rename from PSGSuite/Public/Tasks/Clear-GSTasklist.ps1 rename to DeprecatedFunctions/Tasks/Clear-GSTasklist.ps1 diff --git a/PSGSuite/Public/Tasks/Get-GSTask.ps1 b/DeprecatedFunctions/Tasks/Get-GSTask.ps1 similarity index 100% rename from PSGSuite/Public/Tasks/Get-GSTask.ps1 rename to DeprecatedFunctions/Tasks/Get-GSTask.ps1 diff --git a/PSGSuite/Public/Tasks/Get-GSTasklist.ps1 b/DeprecatedFunctions/Tasks/Get-GSTasklist.ps1 similarity index 100% rename from PSGSuite/Public/Tasks/Get-GSTasklist.ps1 rename to DeprecatedFunctions/Tasks/Get-GSTasklist.ps1 diff --git a/PSGSuite/Public/Tasks/Move-GSTask.ps1 b/DeprecatedFunctions/Tasks/Move-GSTask.ps1 similarity index 100% rename from PSGSuite/Public/Tasks/Move-GSTask.ps1 rename to DeprecatedFunctions/Tasks/Move-GSTask.ps1 diff --git a/PSGSuite/Public/Tasks/New-GSTask.ps1 b/DeprecatedFunctions/Tasks/New-GSTask.ps1 similarity index 100% rename from PSGSuite/Public/Tasks/New-GSTask.ps1 rename to DeprecatedFunctions/Tasks/New-GSTask.ps1 diff --git a/PSGSuite/Public/Tasks/New-GSTasklist.ps1 b/DeprecatedFunctions/Tasks/New-GSTasklist.ps1 similarity index 100% rename from PSGSuite/Public/Tasks/New-GSTasklist.ps1 rename to DeprecatedFunctions/Tasks/New-GSTasklist.ps1 diff --git a/PSGSuite/Public/Tasks/Remove-GSTask.ps1 b/DeprecatedFunctions/Tasks/Remove-GSTask.ps1 similarity index 100% rename from PSGSuite/Public/Tasks/Remove-GSTask.ps1 rename to DeprecatedFunctions/Tasks/Remove-GSTask.ps1 diff --git a/PSGSuite/Public/Tasks/Remove-GSTasklist.ps1 b/DeprecatedFunctions/Tasks/Remove-GSTasklist.ps1 similarity index 100% rename from PSGSuite/Public/Tasks/Remove-GSTasklist.ps1 rename to DeprecatedFunctions/Tasks/Remove-GSTasklist.ps1 diff --git a/PSGSuite/Public/Tasks/Update-GSTask.ps1 b/DeprecatedFunctions/Tasks/Update-GSTask.ps1 similarity index 100% rename from PSGSuite/Public/Tasks/Update-GSTask.ps1 rename to DeprecatedFunctions/Tasks/Update-GSTask.ps1 diff --git a/PSGSuite/Public/Tasks/Update-GSTasklist.ps1 b/DeprecatedFunctions/Tasks/Update-GSTasklist.ps1 similarity index 100% rename from PSGSuite/Public/Tasks/Update-GSTasklist.ps1 rename to DeprecatedFunctions/Tasks/Update-GSTasklist.ps1 diff --git a/PSGSuite/Public/URL Shortener/Get-GSShortUrl.ps1 b/DeprecatedFunctions/URL Shortener/Get-GSShortUrl.ps1 similarity index 100% rename from PSGSuite/Public/URL Shortener/Get-GSShortUrl.ps1 rename to DeprecatedFunctions/URL Shortener/Get-GSShortUrl.ps1 diff --git a/PSGSuite/Public/URL Shortener/New-GSShortUrl.ps1 b/DeprecatedFunctions/URL Shortener/New-GSShortUrl.ps1 similarity index 100% rename from PSGSuite/Public/URL Shortener/New-GSShortUrl.ps1 rename to DeprecatedFunctions/URL Shortener/New-GSShortUrl.ps1 diff --git a/PSGSuite/Aliases/PSGSuite.Aliases.ps1 b/PSGSuite/Aliases/PSGSuite.Aliases.ps1 index 30fb2822..ec8471ac 100644 --- a/PSGSuite/Aliases/PSGSuite.Aliases.ps1 +++ b/PSGSuite/Aliases/PSGSuite.Aliases.ps1 @@ -21,7 +21,6 @@ 'Get-GSOrgUnitList' = 'Get-GSOrganizationalUnit' 'Get-GSOU' = 'Get-GSOrganizationalUnit' 'Get-GSResourceList' = 'Get-GSResource' - 'Get-GSShortURLInfo' = 'Get-GSShortURL' 'Get-GSTeamDrive' = 'Get-GSDrive' 'Get-GSTeamDrivesList' = 'Get-GSDrive' 'Get-GSUserASPList' = 'Get-GSUserASP' diff --git a/PSGSuite/PSGSuite.psd1 b/PSGSuite/PSGSuite.psd1 index 054ea76a..6a9e631b 100644 --- a/PSGSuite/PSGSuite.psd1 +++ b/PSGSuite/PSGSuite.psd1 @@ -12,7 +12,7 @@ RootModule = 'PSGSuite.psm1' # Version number of this module. - ModuleVersion = '2.35.1' + ModuleVersion = '2.36.0' # ID used to uniquely identify this module GUID = '9d751152-e83e-40bb-a6db-4c329092aaec' diff --git a/PSGSuite/Private/Import-GoogleSDK.ps1 b/PSGSuite/Private/Import-GoogleSDK.ps1 index 5f8217b4..c8271ede 100644 --- a/PSGSuite/Private/Import-GoogleSDK.ps1 +++ b/PSGSuite/Private/Import-GoogleSDK.ps1 @@ -12,18 +12,39 @@ function Import-GoogleSDK { Write-Verbose "Importing the SDK's for netstandard1.3" "$lib\netstandard1.3" } - Get-ChildItem $sdkPath -Filter "*.dll" | Where-Object {$_.Name -notin $refs} | ForEach-Object { - $sdk = $_.Name - try { - Add-Type -Path $_.FullName -ErrorAction Stop - } - catch [System.Reflection.ReflectionTypeLoadException] { - Write-Host "Message: $($_.Exception.Message)" - Write-Host "StackTrace: $($_.Exception.StackTrace)" - Write-Host "LoaderExceptions: $($_.Exception.LoaderExceptions)" - } - catch { - Write-Error "$($sdk): $($_.Exception.Message)" + $dlls = Get-ChildItem $sdkPath -Filter "*.dll" + $googleCore = ($dlls | Where-Object {$_.Name -eq 'Google.Apis.dll'}) + $googleCoreVersion = [System.Version]((Get-Item $googleCore.FullName).VersionInfo.FileVersion) + $batches = @( + # Load the non-Google DLLs first... + ($dlls | Where-Object {$_.Name -notin $refs -and $_.Name -notmatch '^Google'}) + # Then load Google.Apis.dll... + $googleCore + # Then load the rest of the Google DLLs + ($dlls | Where-Object {$_.Name -notin $refs -and $_.Name -match '^Google' -and $_.Name -ne 'Google.Apis.dll'}) + ) + foreach ($batch in $batches) { + $batch | ForEach-Object { + $sdk = $_.Name + try { + $params = @{} + if ($_.Name -match '^Google' -and $_.Name -ne 'Google.Apis.dll' -and ([System.Version]((Get-Item $_.FullName).VersionInfo.FileVersion)) -ge $googleCoreVersion) { + $params['ReferencedAssemblies'] = ($dlls | Where-Object {$_.Name -eq 'Google.Apis.dll'}).FullName + Add-Type -Path $_.FullName @params -ErrorAction Stop + } + elseif ($_.Name -notmatch '^Google' -or $_.Name -eq 'Google.Apis.dll' -or ($_.Name -ne 'Google.Apis.dll' -and ([System.Version]((Get-Item $_.FullName).VersionInfo.FileVersion)) -ge $googleCoreVersion)) { + Add-Type -Path $_.FullName @params -ErrorAction Stop + } + } + catch [System.Reflection.ReflectionTypeLoadException] { + Write-Error "$($sdk): Unable to load assembly!" + Write-Host "Message: $($_.Exception.Message)" + Write-Host "StackTrace: $($_.Exception.StackTrace)" + Write-Host "LoaderExceptions: $($_.Exception.LoaderExceptions)" + } + catch { + Write-Error "$($sdk): $($_.Exception.Message)" + } } } } diff --git a/PSGSuite/Public/Chat/Send-GSChatMessage.ps1 b/PSGSuite/Public/Chat/Send-GSChatMessage.ps1 index 6d11f1d1..9647e7aa 100644 --- a/PSGSuite/Public/Chat/Send-GSChatMessage.ps1 +++ b/PSGSuite/Public/Chat/Send-GSChatMessage.ps1 @@ -54,9 +54,6 @@ function Send-GSChatMessage { You can safely store an encrypted dictionary of Webhooks in the PSGSuite Config by passing a hashtable to the `-Webhook` parameter, i.e.: Set-PSGSuiteConfig -Webhook @{JobReports = 'https://chat.googleapis.com/v1/spaces/xxxxxxxxxx/messages?key=xxxxxxxxxxxxxxxxxx&token=xxxxxxxxxxxxxxxxxx'} - To retrieve a stored Webhook, you can use `Get-GSChatWebhook`, i.e.: - Send-GSChatMessage -Text "Post job report:" -Cards $cards -Webhook (Get-GSChatWebhook JobReports) - .PARAMETER MessageSegment Any Chat message segment objects created with functions named `Add-GSChat*` passed through the pipeline or added directly to this parameter as values. @@ -66,7 +63,7 @@ function Send-GSChatMessage { If $true, returns the message body. .EXAMPLE - Send-GSChatMessage -Text "Post job report:" -Cards $cards -Webhook (Get-GSChatWebhook JobReports) + Send-GSChatMessage -Text "Post job report:" -Cards $cards -Webhook JobReports Sends a simple Chat message using the JobReports webhook diff --git a/PSGSuite/Public/Configuration/Get-PSGSuiteConfig.ps1 b/PSGSuite/Public/Configuration/Get-PSGSuiteConfig.ps1 index d5030844..f24e167f 100644 --- a/PSGSuite/Public/Configuration/Get-PSGSuiteConfig.ps1 +++ b/PSGSuite/Public/Configuration/Get-PSGSuiteConfig.ps1 @@ -53,9 +53,11 @@ function Get-PSGSuiteConfig { function Decrypt { param($String) if ($String -is [System.Security.SecureString]) { - [System.Runtime.InteropServices.Marshal]::PtrToStringAuto( + [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR( [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR( - $String)) + $String + ) + ) } elseif ($String -is [ScriptBlock]) { $String.InvokeReturnAsIs() diff --git a/PSGSuite/Public/Gmail/New-GSGmailSMIMEInfo.ps1 b/PSGSuite/Public/Gmail/New-GSGmailSMIMEInfo.ps1 index 56a3f34c..e7dc343c 100644 --- a/PSGSuite/Public/Gmail/New-GSGmailSMIMEInfo.ps1 +++ b/PSGSuite/Public/Gmail/New-GSGmailSMIMEInfo.ps1 @@ -30,21 +30,21 @@ function New-GSGmailSMIMEInfo { [cmdletbinding()] Param ( - [parameter(Mandatory = $true,ValueFromPipelineByPropertyName = $true)] + [parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)] [string] $SendAsEmail, [parameter(Mandatory = $true)] - [ValidateScript({ - if (!(Test-Path $_)) { - throw "Please enter a valid file path." - } - elseif ($_ -notlike "*.pfx" -and $_ -notlike "*.p12") { - throw "Pkcs12 must be a .pfx or .p12 file" - } - else { - $true - } - })] + [ValidateScript( { + if (!(Test-Path $_)) { + throw "Please enter a valid file path." + } + elseif ($_ -notlike "*.pfx" -and $_ -notlike "*.p12") { + throw "Pkcs12 must be a .pfx or .p12 file" + } + else { + $true + } + })] [string] $Pkcs12, [parameter(Mandatory = $false)] @@ -53,8 +53,8 @@ function New-GSGmailSMIMEInfo { [parameter(Mandatory = $false)] [Switch] $IsDefault, - [parameter(Mandatory = $true,ValueFromPipelineByPropertyName = $true)] - [Alias("PrimaryEmail","UserKey","Mail")] + [parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("PrimaryEmail", "UserKey", "Mail")] [ValidateNotNullOrEmpty()] [string] $User @@ -62,17 +62,20 @@ function New-GSGmailSMIMEInfo { Process { Resolve-Email ([Ref]$User) $serviceParams = @{ - Scope = 'https://www.googleapis.com/auth/gmail.settings.basic' + Scope = @( + 'https://www.googleapis.com/auth/gmail.settings.basic' + 'https://www.googleapis.com/auth/gmail.settings.sharing' + ) ServiceType = 'Google.Apis.Gmail.v1.GmailService' User = $User } $service = New-GoogleService @serviceParams try { $body = New-Object 'Google.Apis.Gmail.v1.Data.SmimeInfo' - foreach ($key in $PSBoundParameters.Keys | Where-Object {$body.PSObject.Properties.Name -contains $_}) { + foreach ($key in $PSBoundParameters.Keys | Where-Object { $body.PSObject.Properties.Name -contains $_ }) { switch ($key) { EncryptedKeyPassword { - $pw = (New-Object PSCredential "user",$PSBoundParameters[$key]).GetNetworkCredential().Password + $pw = (New-Object PSCredential "user", $PSBoundParameters[$key]).GetNetworkCredential().Password $body.EncryptedKeyPassword = $pw } Pkcs12 { @@ -86,7 +89,7 @@ function New-GSGmailSMIMEInfo { } } Write-Verbose "Adding new S/MIME of SendAsEmail '$SendAsEmail' for user '$User' using Certificate '$Pkcs12'" - $request = $service.Users.Settings.SendAs.SmimeInfo.Insert($body,$User,$SendAsEmail) + $request = $service.Users.Settings.SendAs.SmimeInfo.Insert($body, $User, $SendAsEmail) $request.Execute() | Add-Member -MemberType NoteProperty -Name 'User' -Value $User -PassThru } catch { diff --git a/README.md b/README.md index 64ab80b6..3bd03221 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,22 @@ 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.34.0 - 2019-11-02 - -* [Issue #245](https://github.com/scrthq/PSGSuite/issues/245) + [PR #246](https://github.com/scrthq/PSGSuite/pull/246) - _Thank you, [@devblackops](https://github.com/devblackops)!_ - * Added: Optional `-CreateMeetEvent` switch parameter to `New-GSCalendarEvent` to create a Google Meet conference and attach it to the calendar event. +#### 2.36.0 - 2020-02-28 + +* [PR #255](https://github.com/scrthq/PSGSuite/pull/255) - _Thanks, [@FISHMANPET](https://github.com/FISHMANPET)!_ + * Added support for `[ScriptBlock]` values on the config, allowing you to provide a script to run that will pull in a configuration value (vs embedded the value directly on the config) +* [PR #255](https://github.com/scrthq/PSGSuite/pull/260) - _Thanks, [@vaskotoo](https://github.com/vaskotoo)!_ + * Added support for an array of Users on `Get-GSGmailMessageList` +* [PR #261](https://github.com/scrthq/PSGSuite/issues/261) - _Thanks, [@Foggy2](https://github.com/Foggy2)!_ + * Added support for all license types including undocumented ones. + * Closed out [Issue #252](https://github.com/scrthq/PSGSuite/issues/252) as well. +* [PR #262](https://github.com/scrthq/PSGSuite/issues/262) - _Thanks, [@nwls-hermesj](https://github.com/nwls-hermesj)!_ + * Added support for pipeline input of Drive file objects to `Remove-GSDriveFile`. +* [Issue #256](https://github.com/scrthq/PSGSuite/issues/256) + * Cleaned up docs on `Send-GSChatMessage`. +* [Issue #258](https://github.com/scrthq/PSGSuite/issues/258) + * Removed URL Shortener functions due to Google deprecation. +* [Issue #263](https://github.com/scrthq/PSGSuite/issues/263) + * Fixed `[SecureString]` decryption on Unix machines running PowerShell 7 +* Miscellaneous + * Removed the Tasks API functions. Google has not pushed an update to the Tasks .NET SDK in over 2 months, so it is now behind the current release versions of the core Google.Apis assemblies, resulting in failure to import. diff --git a/ci/AzurePipelinesHelpers.ps1 b/ci/AzurePipelinesHelpers.ps1 index 94d7b177..23bbbda0 100644 --- a/ci/AzurePipelinesHelpers.ps1 +++ b/ci/AzurePipelinesHelpers.ps1 @@ -33,11 +33,12 @@ function Install-NuGetDependencies { foreach ($search in $AddlSearchString) { Write-BuildLog "Finding NuGet packages matching SearchString: $search" Register-PackageSource -Name NuGet -Location https://www.nuget.org/api/v2 -ProviderName NuGet -Force -Trusted -ForceBootstrap - PackageManagement\Find-Package $search -Source NuGet -AllowPrereleaseVersions:$false -Verbose | Where-Object {$_.Name -in $packagesToInstall.BaseName} | ForEach-Object { + PackageManagement\Find-Package $search -Source NuGet -AllowPrereleaseVersions:$false | Where-Object {$_.Name -in $packagesToInstall.BaseName} | ForEach-Object { Write-BuildLog "Matched package: $($_.Name)" $nugHash[$_.Name] = $_ } } + $webClient = New-Object System.Net.WebClient foreach ($inst in $packagesToInstall) { try { $pkg = if ($nugHash.ContainsKey($inst.BaseName)) { @@ -64,7 +65,8 @@ function Install-NuGetDependencies { $pkgUrl = 'https://www.nuget.org/api/v2/package/'+ ($pkg.TagId.Replace('#','/')) $i = 0 do { - Invoke-WebRequest -Uri $pkgUrl -OutFile $zipPath + $webClient.DownloadFile($pkgUrl,$zipPath) + #Invoke-WebRequest -Uri $pkgUrl -OutFile $zipPath $i++ } until ((Test-Path $zipPath) -or $i -ge 5) @@ -87,7 +89,7 @@ function Install-NuGetDependencies { [System.IO.Path]::Combine($extPath,'lib',$target) } if (Test-Path $sourcePath) { - Get-ChildItem $sourcePath -Filter '*.dll' | Copy-Item -Destination $targetPath -Force -Verbose + Get-ChildItem $sourcePath -Filter '*.dll' | Copy-Item -Destination $targetPath -Force } else { Write-BuildError "$($pkg.Name) was not downloaded successfully from NuGet!" -ErrorAction Stop @@ -108,6 +110,7 @@ function Install-NuGetDependencies { } } } + $webClient.Dispose() } finally { if (Test-Path $dllStgPath) { diff --git a/ci/NuGetDependencies.json b/ci/NuGetDependencies.json index c5447232..85801f48 100644 --- a/ci/NuGetDependencies.json +++ b/ci/NuGetDependencies.json @@ -9,7 +9,7 @@ "Name": "Google.Apis.dll", "BaseName": "Google.Apis", "Target": "Latest", - "LatestVersion": "1.41.1" + "LatestVersion": "1.44.0" }, { "Name": "Google.Apis.Admin.DataTransfer.datatransfer_v1.dll", @@ -35,12 +35,6 @@ "Target": "Latest", "LatestVersion": "1.41.1" }, - { - "Name": "Google.Apis.Auth.PlatformServices.dll", - "BaseName": "Google.Apis.Auth.PlatformServices", - "Target": "Latest", - "LatestVersion": "1.41.1" - }, { "Name": "Google.Apis.Calendar.v3.dll", "BaseName": "Google.Apis.Calendar.v3", @@ -113,12 +107,6 @@ "Target": "Latest", "LatestVersion": "1.41.1.1715" }, - { - "Name": "Google.Apis.PlatformServices.dll", - "BaseName": "Google.Apis.PlatformServices", - "Target": "Latest", - "LatestVersion": "1.41.1" - }, { "Name": "Google.Apis.Script.v1.dll", "BaseName": "Google.Apis.Script.v1", @@ -143,22 +131,16 @@ "Target": "Latest", "LatestVersion": "1.41.1.1713" }, - { - "Name": "Google.Apis.Urlshortener.v1.dll", - "BaseName": "Google.Apis.Urlshortener.v1", - "Target": "Latest", - "LatestVersion": "1.41.1.138" - }, { "Name": "MimeKit.dll", "BaseName": "MimeKit", - "Target": "1.10.1.0", + "Target": "Latest", "LatestVersion": "1.10.1.0" }, { "Name": "Newtonsoft.Json.dll", "BaseName": "Newtonsoft.Json", - "Target": "10.0.3", - "LatestVersion": "10.0.3" + "Target": "Latest", + "LatestVersion": "12.0.3" } ] diff --git a/ci/UpdateNuGetDependenciesJson.ps1 b/ci/UpdateNuGetDependenciesJson.ps1 index 46bfaf66..38eb0e14 100644 --- a/ci/UpdateNuGetDependenciesJson.ps1 +++ b/ci/UpdateNuGetDependenciesJson.ps1 @@ -1,4 +1,4 @@ -if ($items = Get-ChildItem (Resolve-Path $PSScriptRoot\..\BuildOutput\PSGSuite\*\lib\net45 -ErrorAction SilentlyContinue).Path -Filter '*.dll') { +if ($items = Get-ChildItem (Resolve-Path $PSScriptRoot\..\BuildOutput\PSGSuite\*\lib\net45 -ErrorAction SilentlyContinue).Path -Filter '*.dll' | Where-Object {$_.BaseName -ne 'Google.Apis.Auth.PlatformServices'}) { $items | #Where-Object | Sort-Object BaseName | @@ -17,21 +17,11 @@ if ($items = Get-ChildItem (Resolve-Path $PSScriptRoot\..\BuildOutput\PSGSuite\* @{ N='Target' E={ - if ($_.BaseName -match 'Google') { - 'Latest' + if ($_.BaseName -match 'BouncyCastle.Crypto') { + '1.8.1' } else { - switch ($_.BaseName) { - 'BouncyCastle.Crypto' { - '1.8.1' - } - 'MimeKit' { - '1.10.1.0' - } - 'Newtonsoft.Json' { - '10.0.3' - } - } + 'Latest' } } },