-
How do I define tpp_token to send as a parameter as session for a command like Find-VenafiCertificate? Find-VenafiCertificate -VenafiSession $VenafiSession doesn't work. I keep getting this error - Please run New-VenafiSession or provide a VaaS key or TPP token.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
If New-VenafiSession is used as is, without -PassThru, there is no need to provide -VenafiSession to any function as the venafi session is saved to a local session variable. New-VenafiSession -Credential $credential -Server Venafi.org.com -ClientId vcert-cli -scope @{'certificate'='manage,revoke';'configuration'='manage';'ssh'='manage'}
Find-VenafiCertificate Optionally, you can add -PassThru to New-VenafiSession, set the output to a variable and then pass that to Find-VenafiCertificate as -VenafiSession. In this case, I recommend using a variable name other than $VenafiSession. $sess = New-VenafiSession -Credential $credential -Server Venafi.org.com -ClientId vcert-cli -scope @{'certificate'='manage,revoke';'configuration'='manage';'ssh'='manage'} -PassThru
Find-VenafiCertificate -VenafiSession $sess |
Beta Was this translation helpful? Give feedback.
If New-VenafiSession is used as is, without -PassThru, there is no need to provide -VenafiSession to any function as the venafi session is saved to a local session variable.
Optionally, you can add -PassThru to New-VenafiSession, set the output to a variable and then pass that to Find-VenafiCertificate as -VenafiSession. In this case, I recommend using a variable name other than $VenafiSession.