Venafi / VenafiPS

Powershell module to fully automate your Venafi TLS Protect Datacenter and Cloud platforms!
https://venafips.readthedocs.io/
Apache License 2.0
18 stars 7 forks source link

Set-TppAttribute gives spurious error message when clearing custom Identity field #199

Closed ccamacho1966 closed 1 year ago

ccamacho1966 commented 1 year ago

Set-TppAttribute generates a spurious error message (from Test-TppIdentity) when attempting to clear a custom Identity field - note that the field seems to be cleared despite the error message.

PS> $cert.Path
\VED\Policy\Certificates\etc\somecertificate

PS> Set-TppAttribute -Path $cert.Path -Attribute @{"Custom ID field"=$null} -BypassValidation

Test-TppIdentity : Cannot validate argument on parameter 'ID'. The argument is null, empty, or an element of the argument collection
contains a null value. Supply a collection that does not contain any null values and then try the command again.
At C:\Program Files\WindowsPowerShell\Modules\VenafiPS\5.4.1\Public\Set-TppAttribute.ps1:162 char:49
+ ... thisValue | Test-TppIdentity -ExistOnly -VenafiSession $VenafiSession ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Test-TppIdentity], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Test-TppIdentity

VenafiPS version 5.4.1