Full Operating System: Windows Server 2019 Datacenter, version 1809, build 17763.2061
VenafiPS version: 6.1.4
PowerShell version: 5.1.17763.1971
TLSPDC version (if applicable): TPP 22.4.6 standalone.
Where credentials correspond to a Master Admin and $clientId corresponds to an API integration that includes certificate + configuration scopes and which the Master Admin is allowed to use (so no error is received when generating the token and, in fact, other Web SDK calls work correctly).
Expected behavior
The Get-VdcAttribute command with the parameters from above should work without issues. If anything, a warning that using PowerShell Core v7+ could make the call work much faster, but no error in red.
Actual behavior
The error below can be seen, see also first provided screenshot:
Invoke-VenafiRestMethod : Cannot bind parameter because parameter 'UriLeaf' is specified more than once. To provide multiple values to parameters that can accept multiple values, use the array syntax. For example, "-parameter
value1,value2,value3".
At line:20 char:61
+ ... $response = Invoke-VenafiRestMethod @params -UriLeaf 'Config ...
+ ~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Invoke-VenafiRestMethod], ParameterBindingException
+ FullyQualifiedErrorId : ParameterAlreadyBound,Invoke-VenafiRestMethod
Note that result of the command is displayed after that error, so the command does what is is meant to do but the error message is confusing and inconvenient.
Interestingly, other calls work nicely without errors. That includes the same Get-VdcAttribute command with a specific attribute instead of requesting all of them (see also second provided screenshot):
Environment
Steps to reproduce
Run this command:
Get-VdcAttribute -Path "\VED\Policy\Certificates\Enhanced_Report\cert01.reports.hsbc.corp02.com" -All -NoLookup
In case it is relevant, the OAuth token was obtained through this call:
New-VenafiSession -Server $server -ClientId $clientId -Scope @{'certificate'='' ; 'configuration'=''} -Credential $global:cred
Where credentials correspond to a Master Admin and $clientId corresponds to an API integration that includes certificate + configuration scopes and which the Master Admin is allowed to use (so no error is received when generating the token and, in fact, other Web SDK calls work correctly).
Expected behavior
The Get-VdcAttribute command with the parameters from above should work without issues. If anything, a warning that using PowerShell Core v7+ could make the call work much faster, but no error in red.
Actual behavior
The error below can be seen, see also first provided screenshot:
Note that result of the command is displayed after that error, so the command does what is is meant to do but the error message is confusing and inconvenient.
Interestingly, other calls work nicely without errors. That includes the same Get-VdcAttribute command with a specific attribute instead of requesting all of them (see also second provided screenshot):
Screenshots