我需要通过命令行请求证书我已经调查过certreq是可以请求证书的工具。
我习惯于通过select一个可用的模板来请求证书,但是我需要通过命令行来做同样的事情。
有关如何实现这一目标的任何想法?
如果要显示由友好的Active Directory证书服务CA提供的证书模板列表(在命令行中),请使用certutil -CATemplates 。
C:\Windows\system32>certutil -CATemplates DirectoryEmailReplication: Directory Email Replication -- Auto-Enroll: Access is denied. DomainControllerAuthentication: Domain Controller Authentication -- Auto-Enroll: Access is denied. KerberosAuthentication: Kerberos Authentication -- Auto-Enroll: Access is denied. EFSRecovery: EFS Recovery Agent -- Auto-Enroll: Access is denied. EFS: Basic EFS -- Auto-Enroll: Access is denied. DomainController: Domain Controller -- Auto-Enroll: Access is denied. WebServer: Web Server -- Auto-Enroll: Access is denied. Machine: Computer -- Auto-Enroll: Access is denied. User: User -- Auto-Enroll: Access is denied. SubCA: Subordinate Certification Authority -- Auto-Enroll: Access is denied. Administrator: Administrator -- Auto-Enroll: Access is denied. CertUtil: -CATemplates command completed successfully.
奖金,它也告诉你,你现在是否有权为每个特定的模板注册。
要注册其中一个证书模板,请使用:
certreq -enroll -q WebServer
-q参数禁止所有交互式对话框,使其成为纯粹的命令行体验。