{"id":26669,"date":"2023-03-11T15:41:33","date_gmt":"2023-03-11T15:41:33","guid":{"rendered":"http:\/\/localhost\/helpold\/?p=26669"},"modified":"2023-03-11T15:41:33","modified_gmt":"2023-03-11T15:41:33","slug":"export-private-key-windows-server","status":"publish","type":"post","link":"https:\/\/www.arvancloud.ir\/help\/en\/export-private-key-windows-server\/","title":{"rendered":"How to Export Private Key from Windows Server"},"content":{"rendered":"<p><span data-preserver-spaces=\"true\">Creating a .pfx file is the only way to export a private key from Microsoft Windows Server, which has generated its related CSR. This step by step guide will show you how to create such a file.<\/span><\/p>\n<h2>Creating an MMC Snap-in to Manage Certificates<\/h2>\n<ul>\n<li><span data-preserver-spaces=\"true\">Right-click on the start button and select Run.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Type in \u201cmmc\u201d in the newly opened window and press on OK.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Click on File and select \u201cAdd\/Remove Snap-in\u201d from the menu.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Once in the Add\/Remove Snap-in page, select \u201cCertificates\u201d from the \u201cAvailable Snap-ins\u201d menu on the left and click on Add.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Select \u201cComputer account\u201d and hit Next.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Select \u201cLocal Computer\u201d and click on Finish.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Finally, click on OK and return to the main console.<\/span><\/li>\n<\/ul>\n<h2>Exporting a Certificate<\/h2>\n<p>To export a certificate, follow these instructions.<\/p>\n<ul>\n<li><span data-preserver-spaces=\"true\">Find the \u201cCertificates\u201d folder on the left menu.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Go to:\u00a0<\/span><strong><span data-preserver-spaces=\"true\">Certificates &gt; Personal &gt; Certificates<\/span><\/strong><span data-preserver-spaces=\"true\">.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Right-click on the certificate you wish to export and go to All Tasks and hit Export.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Hit Next on the Certificate Export Wizard to begin the process.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Select \u201cYes, export the private key\u201d and hit next.<\/span><\/li>\n<\/ul>\n<p><span data-preserver-spaces=\"true\"><strong>Note:<\/strong>\u00a0If the \u201cYes, export the private key\u201d option is greyed out for you, that means you did not select the option to export private keys during the certificate creation process; hence you will not be able to create a .pfx file. If the \u201cIIS Manager certificate request wizard\u201d was used to generate a certificate, then the private key will be marked as exportable by default.<\/span><\/p>\n<ul>\n<li><span data-preserver-spaces=\"true\">In the next step, choose \u201cPersonal Information Exchanges &#8211; PKCS #12(.pfx)\u201d and check \u201cInclude all certificates in the certification path if possible\u201d and hit Next.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Set a safe password and click on Next. Make sure to either choose a password you can remember or use a password manager since you will need it when importing the .pfx file on another server.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Choose a name for your .pfx file and where you want to export it and hit Next.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Click on Finish to complete the Certificate Export process.<\/span><\/li>\n<\/ul>\n<p><span data-preserver-spaces=\"true\">If you have followed all the steps correctly,\u00a0 a success prompt will appear.<\/span><\/p>\n<h2>Import a Certificate to Another Server<\/h2>\n<p><span data-preserver-spaces=\"true\">You can use either MMC or IIS Manager to import a .pfx file.<\/span><\/p>\n<h3>Import .pfx File Using MMC<\/h3>\n<p><span data-preserver-spaces=\"true\">Similar to our explanation in the first part of this user guide, open up the MMC console through the Run window and follow these instructions:<\/span><\/p>\n<ul>\n<li><span data-preserver-spaces=\"true\">Find the Personal sub-folder under the Certificates folder, and right-click on it.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Go to: All Tasks &gt; Import.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Hit Next on the Certificate Import Wizard to begin the process.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Choose where you want to import the .pfx file and hit Next.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Enter the password you set during the Export process, and if you intend to export this file from this server again, then make sure you have selected \u201cMark this key as exportable\u201d and hit Next.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Choose \u201cAutomatically select the certificate store based on the type of certificate\u201d and hit Next.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Click on Finish to complete the file import.<\/span><\/li>\n<\/ul>\n<h3>Import .pfx File Using IIS Manager<\/h3>\n<ul>\n<li><span data-preserver-spaces=\"true\">Search \u201cAdministrative Tools\u201d in the Start menu and click on Internet Information Services (IIS) Manager.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Choose the server you want to create a certificate for, from the left menu marked \u201cConnections.\u201d<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Click on \u201cServer Certificates\u201d and then \u201cSecurity.\u201d<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Click on Import from the Actions menu on the right side.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Select the .pfx file on here and enter the password for it and make sure to enable the \u201cAllow this certificate to be exported\u201d option and click on OK.<\/span><\/li>\n<\/ul>\n<p><span data-preserver-spaces=\"true\">Regardless of whether you import this file through MMC or IIS Manager, the final result is that a certificate will be added to the Server Certificates section on IIS Manager.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating a .pfx file is the only way to export a private key from Microsoft Windows Server, which has generated its related CSR. This step by step guide will show you how to create such a file. Creating an MMC Snap-in to Manage Certificates Right-click on the start button and select Run. Type in \u201cmmc\u201d [&hellip;]<\/p>\n","protected":false},"author":79,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"r1_post_views_count":"738","feedback_yes":"","feedback_no":"","ads_id_sidebar":"","ads_id_content":"","footnotes":""},"categories":[249,281],"tags":[],"class_list":["post-26669","post","type-post","status-publish","format-standard","hentry","category-cdn","category-security-setting"],"lang":"en","translations":{"en":26669},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/posts\/26669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/users\/79"}],"replies":[{"embeddable":true,"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/comments?post=26669"}],"version-history":[{"count":0,"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/posts\/26669\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/media?parent=26669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/categories?post=26669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/tags?post=26669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}