Windows server core certificate manager

Install the Certification Authority

Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016

You can use this procedure to install Active Directory Certificate Services (AD CS) so that you can enroll a server certificate to servers that are running Network Policy Server (NPS), Routing and Remote Access Service (RRAS), or both.

  • Before you install Active Directory Certificate Services, you must name the computer, configure the computer with a static IP address, and join the computer to the domain. For more information on how to accomplish these tasks, see the Windows Server 2016 Core Network Guide.
  • To perform this procedure, the computer on which you are installing AD CS must be joined to a domain where Active Directory Domain Services (AD DS) is installed.

Membership in both the Enterprise Admins and the root domain’s Domain Admins group is the minimum required to complete this procedure.

To perform this procedure by using Windows PowerShell, open Windows PowerShell and type the following command, and then press ENTER.

Add-WindowsFeature Adcs-Cert-Authority -IncludeManagementTools

After AD CS is installed, type the following command and press ENTER.

Install-AdcsCertificationAuthority -CAType EnterpriseRootCA

To install Active Directory Certificate Services

If you want to use Windows PowerShell to install Active Directory Certificate Services, see Install-AdcsCertificationAuthority for cmdlets and optional parameters.

Log on as a member of both the Enterprise Admins group and the root domain’s Domain Admins group.

In Server Manager, click Manage, and then click Add Roles and Features. The Add Roles and Features Wizard opens.

In Before You Begin, click Next.

The Before You Begin page of the Add Roles and Features Wizard is not displayed if you have previously selected Skip this page by default when the Add Roles and Features Wizard was run.

In Select Installation Type, ensure that Role-Based or feature-based installation is selected, and then click Next.

In Select destination server, ensure that Select a server from the server pool is selected. In Server Pool, ensure that the local computer is selected. Click Next.

In Select Server Roles, in Roles, select Active Directory Certificate Services. When you are prompted to add required features, click Add Features, and then click Next.

In Select features, click Next.

In Active Directory Certificate Services, read the provided information, and then click Next.

In Confirm installation selections, click Install. Do not close the wizard during the installation process. When installation is complete, click Configure Active Directory Certificate Services on the destination server. The AD CS Configuration wizard opens. Read the credentials information and, if needed, provide the credentials for an account that is a member of the Enterprise Admins group. Click Next.

In Role Services, click Certification Authority, and then click Next.

On the Setup Type page, verify that Enterprise CA is selected, and then click Next.

On the Specify the type of the CA page, verify that Root CA is selected, and then click Next.

On the Specify the type of the private key page, verify that Create a new private key is selected, and then click Next.

On the Cryptography for CA page, keep the default settings for CSP (RSA#Microsoft Software Key Storage Provider) and hash algorithm (SHA2), and determine the best key character length for your deployment. Large key character lengths provide optimal security; however, they can impact server performance and might not be compatible with legacy applications. It is recommended that you keep the default setting of 2048. Click Next.

On the CA Name page, keep the suggested common name for the CA or change the name according to your requirements. Ensure that you are certain the CA name is compatible with your naming conventions and purposes, because you cannot change the CA name after you have installed AD CS. Click Next.

Читайте также:  Легкие дистрибутивы linux для intel atom

On the Validity Period page, in Specify the validity period, type the number and select a time value (Years, Months, Weeks, or Days). The default setting of five years is recommended. Click Next.

On the CA Database page, in Specify the database locations, specify the folder location for the certificate database and the certificate database log. If you specify locations other than the default locations, ensure that the folders are secured with access control lists (ACLs) that prevent unauthorized users or computers from accessing the CA database and log files. Click Next.

In Confirmation, click Configure to apply your selections, and then click Close.

Certmgr.exe (средство диспетчера сертификатов) Certmgr.exe (Certificate Manager Tool)

Диспетчер сертификатов (Certmgr.exe) предназначен для управления сертификатами, списками доверия сертификатов (CTL) и списками отзыва сертификатов (CRL). The Certificate Manager tool (Certmgr.exe) manages certificates, certificate trust lists (CTLs), and certificate revocation lists (CRLs).

Диспетчер сертификатов устанавливается автоматически вместе с Visual Studio. The Certificate Manager is automatically installed with Visual Studio. Для запуска этого средства используйте Командную строку разработчика или PowerShell для разработчиков в Visual Studio. To start the tool, use Visual Studio Developer Command Prompt or Visual Studio Developer PowerShell.

Диспетчер сертификатов (Certmgr.exe) является служебной программой командной строки, в то время как сертификаты (Certmgr.msc) — это оснастка консоли управления (MMC). The Certificate Manager tool (Certmgr.exe) is a command-line utility, whereas Certificates (Certmgr.msc) is a Microsoft Management Console (MMC) snap-in. Поскольку файл Certmgr.msc обычно находится в системном каталоге Windows, при вводе certmgr в командной строке может загрузиться оснастка консоли управления (MMC) «Сертификаты», даже если открыта командная строка разработчика для Visual Studio. Because Certmgr.msc is usually found in the Windows System directory, entering certmgr at the command line may load the Certificates MMC snap-in even if you have opened the Developer Command Prompt for Visual Studio. Это происходит потому, что путь к оснастке предшествует пути к диспетчеру сертификатов в переменной среды PATH. This occurs because the path to the snap-in precedes the path to the Certificate Manager tool in the PATH environment variable. При возникновении этой проблемы команды Certmgr.exe можно выполнить, указав путь к исполняемому файлу. If you encounter this problem, you can execute Certmgr.exe commands by specifying the path to the executable.

Общие сведения о сертификатах X.509 см. в разделе Работа с сертификатами. For an overview of X.509 certificates, see Working with Certificates.

В командной строке введите следующее. At the command prompt, type the following:

Синтаксис Syntax

Параметры Parameters

Аргумент Argument Описание Description
sourceStorename sourceStorename Хранилище сертификатов, содержащее существующие сертификаты, списки доверия сертификатов (CTL) и списки отзыва сертификатов (CRL) для добавления, удаления, сохранения или отображения. The certificate store that contains the existing certificates, CTLs, or CRLs to add, delete, save, or display. Это может быть файл хранилища или хранилище систем. This can be a store file or a systems store.
destinationStorename destinationStorename Конечное хранилище сертификатов или файл. The output certificate store or file.
Параметр Option Описание: Description
/add /add Добавляет сертификаты, CTL и CRL в хранилище сертификатов. Adds certificates, CTLs, and CRLs to a certificate store.
/all /all Добавляет все записи при использовании параметра /add. Adds all entries when used with /add. Удаляет все записи при использовании параметра /del. Отображает все записи при использовании без параметров /add или /del. Deletes all entries when used with /del. Displays all entries when used without the /add or /del options. Параметр /all нельзя использовать вместе с параметром /put. The /all option cannot be used with /put.
/c /c Добавляет сертификаты при использовании параметра /add. Adds certificates when used with /add. Удаляет сертификаты при использовании параметра /del. Сохраняет сертификаты при использовании параметра /put. Deletes certificates when used with /del. Saves certificates when used with /put. Отображает сертификаты при использовании без параметра /add, /del или /put. Displays certificates when used without the /add, /del, or /put option.
/CRL /CRL При использовании с параметром /add добавляет списки отзыва сертификатов (CRL). Adds CRLs when used with /add. При использовании с параметром /del удаляет списки отзыва сертификатов (CRL). Сохраняет списки CRL при использовании с параметром /put. Deletes CRLs when used with /del. Saves CRLs when used with /put. Отображает списки отзыва сертификатов (CRL) при использовании без параметра /add, /del или /put. Displays CRLs when used without the /add, /del, or /put option.
/CTL /CTL При использовании с параметром /add добавляет списки доверия сертификатов (CTL). Adds CTLs when used with /add. При использовании с параметром /del удаляет списки доверия сертификатов (CTL). Сохраняет списки CTL при использовании с параметром /put. Deletes CTLs when used with /del. Saves CTLs when used with /put. Отображает списки доверия сертификатов (CTL) при использовании без параметра /add, /del или /put. Displays CTLs when used without the /add, /del, or /put option.
/del /del Удаляет сертификаты, CTL и CRL из хранилища сертификатов. Deletes certificates, CTLs, and CRLs from a certificate store.
/e encodingType /e encodingType Указывает тип шифрования сертификата. Specifies the certificate encoding type. Значение по умолчанию — X509_ASN_ENCODING . The default is X509_ASN_ENCODING .
/f dwFlags /f dwFlags Задает открытый флаг хранилища. Specifies the store open flag. Это параметр dwFlags, передаваемый методу CertOpenStore. This is the dwFlags parameter passed to CertOpenStore. По умолчанию используется значение CERT_SYSTEM_STORE_CURRENT_USER. The default value is CERT_SYSTEM_STORE_CURRENT_USER. Этот параметр обрабатывается, только если задан параметр /y. This option is considered only if the /y option is used.
/h[elp] /h[elp] Отображает синтаксис команд и параметров программы. Displays command syntax and options for the tool.
/n nam /n nam Задает общее имя добавляемого, удаляемого или сохраняемого сертификата. Specifies the common name of the certificate to add, delete, or save. Этот параметр может применяться только для сертификатов, его нельзя задавать для CTL и CRL. This option can only be used with certificates; it cannot be used with CTLs or CRLs.
/put /put Сохраняет в файл сертификат X.509, CTL или CRL из хранилища сертификатов. Saves an X.509 certificate, CTL, or CRL from a certificate store to a file. Файл сохраняется в формате X.509. The file is saved in X.509 format. Чтобы сохранить файл в формате PKCS #7, можно использовать параметр /7 с параметром /put. You can use the /7 option with the /put option to save the file in PKCS #7 format. За параметром /put должен следовать параметр /c, /CTL или /CRL. The /put option must be followed by either /c, /CTL, or /CRL. Параметр /all нельзя использовать вместе с параметром /put. The /all option cannot be used with /put.
/r location /r location Указывает расположение системного хранилища в реестре. Identifies the registry location of the system store. Этот параметр обрабатывается, только если задан параметр /s. This option is considered only if you specify the /s option. Параметр location должен иметь одно из следующих значений. location must be one of the following:

— currentUser означает, что хранилище сертификатов находится в разделе HKEY_CURRENT_USER. — currentUser indicates that the certificate store is under the HKEY_CURRENT_USER key. Это значение по умолчанию. This is the default.
— localMachine означает, что хранилище сертификатов находится в разделе HKEY_LOCAL_MACHINE. — localMachine indicates that the certificate store is under the HKEY_LOCAL_MACHINE key.

/s /s Означает, что хранилище сертификатов является системным. Indicates that the certificate store is a system store. Если этот параметр не задан, хранилищем считается StoreFile. If you do not specify this option, the store is considered to be a StoreFile.
/sha1 sha1Hash /sha1 sha1Hash Задает хэш SHA1 добавляемого, удаляемого или сохраняемого сертификата, CTL или CRL. Specifies the SHA1 hash of the certificate, CTL, or CRL to add, delete, or save.
/v /v Включает отображение подробных сведений о сертификатах, CTL и CRL. Specifies verbose mode; displays detailed information about certificates, CTLs, and CRLs. Этот параметр невозможно использовать с параметрами /add, /del или /put. This option cannot be used with the /add, /del, or /put options.
/y provider /y provider Задает имя поставщика хранилища. Specifies the store provider name.
/7 /7 Сохраняет конечное хранилище как объект PKCS #7. Saves the destination store as a PKCS #7 object.
/? /? Отображает синтаксис команд и параметров программы. Displays command syntax and options for the tool.

Примечания Remarks

Основные функции программы Certmgr.exe. Certmgr.exe performs the following basic functions:

Отображение сведений о сертификатах, CTL и CRL на консоли. Displays certificates, CTLs, and CRLs to the console.

Добавляет сертификаты, CTL и CRL в хранилище сертификатов. Adds certificates, CTLs, and CRLs to a certificate store.

Удаляет сертификаты, CTL и CRL из хранилища сертификатов. Deletes certificates, CTLs, and CRLs from a certificate store.

Сохраняет в файл сертификат X.509, CTL или CRL из хранилища сертификатов. Saves an X.509 certificate, CTL, or CRL from a certificate store to a file.

Программа Certmgr.exe работает с двумя типами хранилищ сертификатов: системным и StoreFile. Certmgr.exe works with two types of certificate stores: StoreFile and system store. Указывать тип хранилища необязательно, поскольку программа Cedrtmgr.exe может автоматически определить тип хранилища и выполнить соответствующие действия. It is not necessary to specify the type of certificate store; Certmgr.exe can identify the store type and perform the appropriate operations.

При запуске программы Certmgr.exe без параметров выполняется оснастка «certmgr.msc» с графическим интерфейсом пользователя, облегчающим управление сертификатами, что также можно сделать из командной строки. Running Certmgr.exe without specifying any options launches the certmgr.msc snap-in, which has a GUI that helps with the certificate management tasks that are also available from the command line. В графическом интерфейсе пользователя имеется мастер импорта, копирующий сертификаты, CTL и CRL с диска в хранилище сертификатов. The GUI provides an import wizard, which copies certificates, CTLs, and CRLs from your disk to a certificate store.

Чтобы найти имена хранилищ X509Certificate для параметров sourceStorename и destinationStorename , можно скомпилировать и выполнить следующий код. You can find the names of X509Certificate stores for the sourceStorename and destinationStorename parameters by compiling and running the following code.

Дополнительные сведения см. в разделе Работа с сертификатами. For more information about certificates, see Working with Certificates.

Примеры Examples

Следующая команда выводит подробные сведения о содержимом системного хранилища my , используемого по умолчанию. The following command displays a default system store called my with verbose output.

Следующая команда добавляет все сертификаты из файла myFile.ext в новый файл newFile.ext . The following command adds all the certificates in a file called myFile.ext to a new file called newFile.ext .

Следующая команда добавляет сертификат в файле testcert.cer в хранилище системы my . The following command adds the certificate in a file named testcert.cer to the my system store.

Следующая команда добавляет сертификат в файле TrustedCert.cer в хранилище корневых сертификатов. The following command adds the certificate in a file named TrustedCert.cer to the root certificate store.

Следующая команда сохраняет сертификат с общим именем myCert в системном хранилище my в файл newCert.cer . The following command saves a certificate with the common name myCert in the my system store to a file called newCert.cer .

Следующая команда удаляет все CTL из системного хранилища my и сохраняет полученное хранилище в файл newStore.str . The following command deletes all CTLs in the my system store and saves the resulting store to a file called newStore.str .

Следующая команда сохраняет сертификат в системном хранилище my в файл newFile . The following command saves a certificate in the my system store in the file newFile . Программа запросит у пользователя номер сертификата из хранилища my , который следует поместить в файл newFile . You will be prompted to enter the certificate number from my to put in newFile .

Читайте также:  Файрвол для windows 10 рейтинг
Оцените статью