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

Test-VdcToken Throws Exception WIth Unsupported TLSPDC Version #274

Closed astro2000j closed 5 months ago

astro2000j commented 5 months ago

Environment

Full Operating System: Windows Server 2019
VenafiPS version: 6.3.1
PowerShell version: Desktop 5.1
TLSPDC version (if applicable): 23.1

Steps to reproduce

if (Test-VdcToken) {
    New-VenafiSession ...
} 

Expected behavior

The Test-VdcToken should detected if $VenafiSession is initialized and contains a valid token and if so, return $true. If the $VenafiSession does not exist or the token is invalid, the return should be $false.

Actual behavior

When calling the Test-VdcToken function on an uninitialized $VenafiSession, I encountered the following error:

Test-VdcToken is only supported on version 20.3 and later.

The version of TLSPDC was 23.1, but because the function was not able to parse the $VenafiSession.Version value, the error message above was displayed.