From 71e1e0775a7dcde5449005564afcea9ca7791e6a Mon Sep 17 00:00:00 2001 From: Greg Brownstein Date: Fri, 13 Sep 2024 16:05:45 +0000 Subject: [PATCH] Update manifest and docs to 6.4.2 --- CHANGELOG.md | 5 +++ VenafiPS/VenafiPS.psd1 | 4 +-- docs/changelog.md | 5 +++ docs/functions/Invoke-VcCertificateAction.md | 34 +++++++++++++++----- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6a244a3..1c564f9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 6.4.2 +- Add batching to `Invoke-VcCertificateAction` with progress and verbose logging. Batches will be 1000 by default, but can be overridden with `-BatchSize`. Also added better use of ShouldProcess. + + ## 6.4.1 - Fix `Import-VdcCertificate -Data` failure due to being converted to an array. [#290](https://github.com/Venafi/VenafiPS/issues/290) @@ -713,5 +717,6 @@ This is a major release. Although every attempt has been made to be backwards c + diff --git a/VenafiPS/VenafiPS.psd1 b/VenafiPS/VenafiPS.psd1 index 022faa07..1e9d00d8 100644 --- a/VenafiPS/VenafiPS.psd1 +++ b/VenafiPS/VenafiPS.psd1 @@ -3,7 +3,7 @@ # # Generated by: Greg Brownstein # -# Generated on: 08/08/2024 +# Generated on: 09/13/2024 # @{ @@ -12,7 +12,7 @@ RootModule = 'VenafiPS.psm1' # Version number of this module. -ModuleVersion = '6.4.1' +ModuleVersion = '6.4.2' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/docs/changelog.md b/docs/changelog.md index 1c680969..42eda709 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,7 @@ +## 6.4.2 +- Add batching to `Invoke-VcCertificateAction` with progress and verbose logging. Batches will be 1000 by default, but can be overridden with `-BatchSize`. Also added better use of ShouldProcess. + + ## 6.4.1 - Fix `Import-VdcCertificate -Data` failure due to being converted to an array. [#290](https://github.com/Venafi/VenafiPS/issues/290) @@ -713,5 +717,6 @@ This is a major release. Although every attempt has been made to be backwards c + diff --git a/docs/functions/Invoke-VcCertificateAction.md b/docs/functions/Invoke-VcCertificateAction.md index 573d94d2..eab8d690 100644 --- a/docs/functions/Invoke-VcCertificateAction.md +++ b/docs/functions/Invoke-VcCertificateAction.md @@ -7,31 +7,32 @@ Perform an action against one or more certificates ### Retire ``` -Invoke-VcCertificateAction -ID [-Retire] [-AdditionalParameters ] +Invoke-VcCertificateAction -ID [-Retire] [-BatchSize ] [-AdditionalParameters ] [-VenafiSession ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Recover ``` -Invoke-VcCertificateAction -ID [-Recover] [-AdditionalParameters ] +Invoke-VcCertificateAction -ID [-Recover] [-BatchSize ] [-AdditionalParameters ] [-VenafiSession ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Renew ``` -Invoke-VcCertificateAction -ID [-Renew] [-Force] [-AdditionalParameters ] - [-VenafiSession ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +Invoke-VcCertificateAction -ID [-Renew] [-BatchSize ] [-Force] + [-AdditionalParameters ] [-VenafiSession ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### Validate ``` -Invoke-VcCertificateAction -ID [-Validate] [-AdditionalParameters ] +Invoke-VcCertificateAction -ID [-Validate] [-BatchSize ] [-AdditionalParameters ] [-VenafiSession ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Delete ``` -Invoke-VcCertificateAction -ID [-Delete] [-AdditionalParameters ] +Invoke-VcCertificateAction -ID [-Delete] [-BatchSize ] [-AdditionalParameters ] [-VenafiSession ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -90,10 +91,10 @@ Only applicable to Delete. ### EXAMPLE 7 ``` -Find-VcObject -Type Certificate -Filter @('certificateStatus','eq','retired') | Invoke-VcCertificateAction -Delete +Find-VcObject -Type Certificate -Filter @('certificateStatus','eq','retired') | Invoke-VcCertificateAction -Delete -BatchSize 100 ``` -Search for all retired certificates and delete them +Search for all retired certificates and delete them using a non default batch size of 100 ## PARAMETERS @@ -190,6 +191,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -BatchSize +How many certificates to retire per retirement API call. +Useful to prevent API call timeouts. +Defaults to 1000 + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 1000 +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Force Force the operation under certain circumstances. - During a renewal, force choosing the first CN in the case of multiple CNs as only 1 is supported.