text
stringlengths
0
4.23k
Remarks
The Certificate Authority may also need to be configured to support foreign certificates. To do this, type import - certutil -setreg ca\KRAFlags +KRAF_ENABLEFOREIGN.
import - certutil -setreg ca\KRAFlags +KRAF_ENABLEFOREIGN
-getkey
Retrieves an archived private key recovery blob, generates a recovery script, or recovers archived keys.
certutil [options] -getkey searchtoken [recoverybloboutfile]
certutil [options] -getkey searchtoken script outputscriptfile
certutil [options] -getkey searchtoken retrieve | recover outputfilebasename
Where:
script generates a script to retrieve and recover keys (default behavior if multiple matching recovery candidates are found, or if the output file isn't specified).
retrieve retrieves one or more Key Recovery Blobs (default behavior if exactly one matching recovery candidate is found, and if the output file is specified). Using this option truncates any extension and appends the certificate-specific string and the .rec extension for each key recovery blob. Each file contains a certificate chain and an associated private key, still encrypted to one or more Key Recovery Agent certificates.
recover retrieves and recovers private keys in one step (requires Key Recovery Agent certificates and private keys). Using this option truncates any extension and appends the .p12 extension. Each file contains the recovered certificate chains and associated private keys, stored as a PFX file.
searchtoken selects the keys and certificates to be recovered, including:
recoverybloboutfile outputs a file with a certificate chain and an associated private key, still encrypted to one or more Key Recovery Agent certificates.
outputscriptfile outputs a file with a batch script to retrieve and recover private keys.
outputfilebasename outputs a file base name.
[-f] [-unicodetext] [-silent] [-config Machine\CAName] [-p password] [-protectto SAMnameandSIDlist] [-csp provider]
-recoverkey
Recover an archived private key.
certutil [options] -recoverkey recoveryblobinfile [PFXoutfile [recipientindex]]
[-f] [-user] [-silent] [-split] [-p password] [-protectto SAMnameandSIDlist] [-csp provider] [-t timeout]
-mergePFX
Merges PFX files.
certutil [options] -mergePFX PFXinfilelist PFXoutfile [extendedproperties]
Where:
PFXinfilelist is a comma-separated list of PFX input files.
PFXoutfile is the name of the PFX output file.
extendedproperties includes any extended properties.
[-f] [-user] [-split] [-p password] [-protectto SAMnameAndSIDlist] [-csp provider]
Remarks
The password specified on the command line must be a comma-separated password list.
If more than one password is specified, the last password is used for the output file. If only one password is provided or if the last password is *, the user will be prompted for the output file password.
*
-convertEPF
Converts a PFX file into an EPF file.
certutil [options] -convertEPF PFXinfilelist PFXoutfile [cast | cast-] [V3CAcertID][,salt]
Where:
PFXinfilelist is a comma-separated list of PFX input files.
PFXoutfile is the name of the PFX output file.
EPF is the name of the EPF output file.
cast uses CAST 64 encryption.
cast- uses CAST 64 encryption (export)
V3CAcertID is the V3 CA certificate match token. For more info, see the -store parameter in this article.
-store
salt is the EPF output file salt string.
[-f] [-silent] [-split] [-dc DCName] [-p password] [-csp provider]
Remarks
The password specified on the command line must be a comma-separated password list.
If more than one password is specified, the last password is used for the output file. If only one password is provided or if the last password is *, the user will be prompted for the output file password.
*
-?
Displays the list of parameters.
certutil -?
certutil <name_of_parameter> -?
certutil -? -v
Where:
-? displays the full list of parameters
-<name_of_parameter> -? displays help content for the specified parameter.
<name_of_parameter>
-? -v displays a full list of parameters and options.
-syncWithWU
Syncs with Windows Update. The following files are downloaded by using the automatic update
mechanism.
CertUtil [Options] -syncWithWU DestinationDir
Where:
[-f] [-Unicode] [-gmt] [-seconds] [-v] [-privatekey] [-pin PIN] [-sid WELL_KNOWN_SID_TYPE]
Where:
Remarks
The following files are downloaded by using the automatic update mechanism:
authrootstl.cab
disallowedcertstl.cab
disallowedcert.sst
thumbprint.crt
For example, CertUtil -syncWithWU \\server1\PKI\CTLs.
CertUtil -syncWithWU \\server1\PKI\CTLs
If you use a non-existent local path or folder as the destination folder, you'll see the error:
The system can't find the file specified. 0x80070002 (WIN32: 2 ERROR_FILE_NOT_FOUND)
The system can't find the file specified. 0x80070002 (WIN32: 2 ERROR_FILE_NOT_FOUND)
If you use a non-existent or unavailable network location as the destination folder, you'll see the error:
The network name can't be found. 0x80070043 (WIN32: 67 ERROR_BAD_NET_NAME)
The network name can't be found. 0x80070043 (WIN32: 67 ERROR_BAD_NET_NAME)
If your server can't connect over TCP port 80 to Microsoft Automatic Update servers, you'll receive the following error:
A connection with the server couldn't be established 0x80072efd (INet: 12029 ERROR_INTERNET_CANNOT_CONNECT)
A connection with the server couldn't be established 0x80072efd (INet: 12029 ERROR_INTERNET_CANNOT_CONNECT)
If your server is unable to reach the Microsoft Automatic Update servers with the DNS name ctldl.windowsupdate.com, you'll receive the following error:
ctldl.windowsupdate.com
The server name or address couldn't be resolved 0x80072ee7 (INet: 12007 ERROR_INTERNET_NAME_NOT_RESOLVED).
The server name or address couldn't be resolved 0x80072ee7 (INet: 12007 ERROR_INTERNET_NAME_NOT_RESOLVED).
If you don't use the -f switch, and any of the CTL files already exist in the directory, you'll receive a file exists error:
-f
CertUtil: -syncWithWU command FAILED: 0x800700b7 (WIN32/HTTP: 183 ERROR_ALREADY_EXISTS) Certutil: Can't create a file when that file already exists.
CertUtil: -syncWithWU command FAILED: 0x800700b7 (WIN32/HTTP: 183 ERROR_ALREADY_EXISTS) Certutil: Can't create a file when that file already exists.