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

Exporting to JKS fails when adding -Outpath .\ #225

Closed JensenBec closed 11 months ago

JensenBec commented 11 months ago

Environment

Operating System: Windows 10 
VenafiPS version: 5.8.1
PowerShell version: 5.1
TPP version (if applicable): 22.4.1

Steps to reproduce

Trying to export a JKS certificate

$cert | Export-VenafiCertificate -FriendlyName "Per" -KeystorePassword (ConvertTo-SecureString -AsPlainText -force -String "PalleIbDfrEd12!") Exports to a String with Certificate Details

CertificateData

/u3+7QAAAAIAAAABAAAAAgADcGVyAAAB

Adding the -Outpath .\ gives the following error:

$cert | Export-VenafiCertificate -FriendlyName "Per" -KeystorePassword (ConvertTo-SecureString -AsPlainText -force -String "PalleIbDfrEd12!") -OutPath .\

Export-VenafiCertificate : Parameter set cannot be resolved using the specified named parameters. At line:1 char:9

An error occur when adding an outpath, c:\temp, .\ both fails

image

gdbarron commented 11 months ago

Thanks for reporting this @JensenBec. This looks to be a bug where -OutPath is not associated with the Jks parameter set. This will be fixed in the next release.