From b77af68aa8cc60ba56834d801959910d3a78fae8 Mon Sep 17 00:00:00 2001 From: Greg Brownstein Date: Wed, 24 Apr 2024 14:48:00 -0400 Subject: [PATCH] fix Test-VdcToken Throws Exception WIth Unsupported TLSPDC Version #274 --- VenafiPS/Public/Test-VdcToken.ps1 | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/VenafiPS/Public/Test-VdcToken.ps1 b/VenafiPS/Public/Test-VdcToken.ps1 index 2ac67436..1ff4f51d 100644 --- a/VenafiPS/Public/Test-VdcToken.ps1 +++ b/VenafiPS/Public/Test-VdcToken.ps1 @@ -138,14 +138,8 @@ function Test-VdcToken { switch ($PsCmdlet.ParameterSetName) { 'Session' { - if ( $VenafiSession.Version -lt [Version]::new('20', '3', '0') ) { - throw 'Test-VdcToken is only supported on version 20.3 and later.' - } - - if ( $GrantDetail.IsPresent ) { - if ( $VenafiSession.Version -lt [Version]::new('20', '4', '0') ) { - throw 'Test-VdcToken -GrantDetail is only supported on version 20.4 and later.' - } + if ( $VenafiSession -isnot [VenafiSession]) { + throw 'Please provide a valid object for -VenafiSession' } $params.VenafiSession = $VenafiSession