Are you getting any error codes like 0x<RandomNumbersandLetters>?
Get-Certificate cmdlet failed
I need to issue a certificate for a server. I run these commands:
$cred = Get-Credential Get-Certificate -Template Templatename -CertStoreLocation Cert:\LocalMachine\My -Credential $cred
But after the second command I get this error:
Get-Certificate :
At line:1 char:1
+ Get-Certificate -Template Templatename -CertStoreLocation Cert:\LocalMachine\ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-Certificate], ParameterBindingException
+ FullyQualifiedErrorId : RuntimeException,Microsoft.CertificateServices.Commands.GetCertificateCommand
What's this? I mean, there's no description of the error. What's wrong? Is that something in the command syntax, is something wrong with the server, with the network... How do I solve this?
4 answers
Sort by: Most helpful
-
-
Rich Matheisen 47,501 Reputation points
2022-06-17T14:43:51.767+00:00 If you look at the properties of the template "Templatename", do you have permission to "Read" and "Enroll" using the template (either explicitly or through security group membership)?
-
rr-4098 1,766 Reputation points
2022-06-19T09:17:49.097+00:00 What OS is the server running? If possible see if you can upgrade Powershell to 5.1.
-
rr-4098 1,766 Reputation points
2022-06-20T14:31:13.693+00:00 Sorry for the confusion, I meant to say upgrade Powershell not the OS.