Skip to content

Commit

Permalink
fix Test-VdcToken Throws Exception WIth Unsupported TLSPDC Version #274
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Brownstein committed Apr 24, 2024
1 parent 59f6065 commit b77af68
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions VenafiPS/Public/Test-VdcToken.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b77af68

Please sign in to comment.