Need to convert vcert.exe command to PS version #227
-
Morning all, I am struggling to get the syntax correct when trying to convert the following vcert.exe command to PS module version : vcert.exe enroll -u "https://xxxx" -t 123 -z "\VED\Policy\Azure-Certificates\test" --cn azure.local -format pkcs12 --file "C:\Temp\azure.local" The above command works fine but cannot get PS to work. I don't mind using username/password if that's easier for the above command. What I am trying to achieve in PS is connect to our Venafi Server then enrol the server to Venafi and get the cert. Can anyone help? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @VinceThompson. There are 3 steps: connect, enroll (new request), and get (export).
A few things to note.
|
Beta Was this translation helpful? Give feedback.
Hi @VinceThompson. There are 3 steps: connect, enroll (new request), and get (export).
New-VenafiSession
. You can have it create an access token for you or if you already have it, as in your example, you can useNew-VenafiSession -Server 'https://xxxx' -AccessToken 123
.New-TppCertificate -path '\ved\policy\azure-certificates\test' -Name 'azure.local' -WorkToDoTimeout 60 -PassThru | Export-VenafiCertificate -TppFormat 'PKCS #12' -OutPath '~/Temp' -PrivateKeyPassword (ConvertTo-SecureString -string 'myPassw0rd!' -AsPlainText -Force)
A few things t…