Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-TPPIdentity -IncludeAssociated #82

Closed
denvenafi opened this issue Feb 11, 2022 · 2 comments · Fixed by #79
Closed

Get-TPPIdentity -IncludeAssociated #82

denvenafi opened this issue Feb 11, 2022 · 2 comments · Fixed by #79

Comments

@denvenafi
Copy link
Contributor

When invoking this method with the -IncludeAssociated parameter the following error is issued:
Get-TPPIdentity : 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".

Sample code:
Import-Module -Name VenafiPS

Add-Type @"
using System.Net;using System.Security.Cryptography.X509Certificates;public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) { return true; }}
"@

[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
[System.Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

$ErrorActionPreference = "Stop"

$password = ConvertTo-SecureString "xxxxxxx" -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PSCredential("administrator@lab.securafi.net",$password)

New-VenafiSession -Server localhost -Credential $Cred -ClientId "WorkflowApp" -Scope @{"Configuration"="manage"}
$Script:VenafiSession

$a = Get-TPPIdentity -ID "AD+ad1:c589dea40536394ea238d73d3919ac04" -IncludeAssociated
$a | Format-List

@gdbarron
Copy link
Collaborator

Please try and use the bug report template instead of free form. Can you please provide the below?
Operating System:
VenafiPS version:
PowerShell version:

@denvenafi
Copy link
Contributor Author

Operating System: Windows 2019
VenafiPS version: 4.1.2
PowerShell version: 5.1.17763.2268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants