Score:0

Retrieve and install pending certificate by PowerShell

ru flag

I am requesting a certificate that must be approved by the CA administrator.

When I make the request, it appears in the CA pending request folder and I right click to issue the certificate. In client machine I want doing by PowerShell what I do in certmg.msc(Automatically Enroll and Retrieve Certificates):

Select top node (Certificates), right-click -> All Tasks -> Automatically Enroll and Retrieve Certificates. Follow certificate enrollment wizard to retrieve and install pending certificate.

djdomi avatar
za flag
and what is the business related question?
Elmano Francisco Gonga avatar
ru flag
I have a script in PowerShell that makes certificate renewal request on a client machine, the script works fine and then I go to my CA to issue the request and then I need to do the similar in PowerShell which is done by certmgr "Automatically Enroll and retrieve certificates "
Score:1
in flag

You can use the -config parameter of certreq to avoid using the GUI.

-retrieve <requestid> Retrieves a response to a previous request from a certificate authority. Pending Requests can be listes with Get-PendingRequest (PowerShell).

For example:

certreq -config "CAHostName\CAName" -retrieve 3499 "d:\test.cer"

Fetches the certificate for request.

certreq -accept "D:\test.cer" -machine

–accept links the previously generated private key with the issued certificate and removes the pending certificate request from the system where the certificate is requested (if there is a matching request).

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.