<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Windows PKI blog : Certification authority</title><link>http://blogs.technet.com/pki/archive/tags/Certification+authority/default.aspx</link><description>Tags: Certification authority</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Using VBScript to install CA on WS2008R2 server core</title><link>http://blogs.technet.com/pki/archive/2009/09/18/using-vbscript-to-install-ca-on-server-core.aspx</link><pubDate>Fri, 18 Sep 2009 19:24:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3281976</guid><dc:creator>shawncor</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/pki/comments/3281976.aspx</comments><wfw:commentRss>http://blogs.technet.com/pki/commentrss.aspx?PostID=3281976</wfw:commentRss><description>&lt;P&gt;In my &lt;A href="http://blogs.technet.com/pki/archive/2009/09/18/automated-ca-installs-using-vb-script-on-windows-server-2008-and-2008r2.aspx" mce_href="http://blogs.technet.com/pki/archive/2009/09/18/automated-ca-installs-using-vb-script-on-windows-server-2008-and-2008r2.aspx"&gt;previous post&lt;/A&gt; I provided a script used for setup and installation of a CA using VBScript. The same script is capable of installing a CA on server core, where there is no UI available for installing. With the script and a few possible additional steps it's pretty easy to install a CA on server core with just a couple of commands in the CMD.&lt;/P&gt;
&lt;P&gt;Steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;If you need the functionality of WoW64, for example using a network HSM that needs to use 32bit binaries on the 64bit system you will need to install the WoW64 support. 
&lt;UL&gt;
&lt;LI&gt;Run "Start /w ocsetup ServerCore-WOW64" to install the WoW64 support, reboot the machine after installing this package.&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;If using an HSM or network HSM install and configure the HSM software by following the instructions provided by the HSM vendor. 
&lt;LI&gt;Use the &lt;A href="http://blogs.technet.com/pki/archive/2009/09/18/automated-ca-installs-using-vb-script-on-windows-server-2008-and-2008r2.aspx" mce_href="http://blogs.technet.com/pki/archive/2009/09/18/automated-ca-installs-using-vb-script-on-windows-server-2008-and-2008r2.aspx"&gt;setupca.vbs&lt;/A&gt; script to install the CA&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The setupca.vbs script takes care of installing all the needed packages and files using OCSetup, since servermanagercmd is not available on the core builds.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3281976" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/pki/archive/tags/setup/default.aspx">setup</category><category domain="http://blogs.technet.com/pki/archive/tags/Certification+authority/default.aspx">Certification authority</category></item><item><title>Automated CA installs using VB script on Windows Server 2008 and 2008R2 [UPDATED]</title><link>http://blogs.technet.com/pki/archive/2009/09/18/automated-ca-installs-using-vb-script-on-windows-server-2008-and-2008r2.aspx</link><pubDate>Fri, 18 Sep 2009 16:23:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3281975</guid><dc:creator>shawncor</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/pki/comments/3281975.aspx</comments><wfw:commentRss>http://blogs.technet.com/pki/commentrss.aspx?PostID=3281975</wfw:commentRss><description>&lt;P&gt;Starting with Windows Server 2008 the CA product team introduced a set of COM objects that can be used to control the installation of CAs. Using VBScript you can quickly automate the setup and installation of a CA.Below is a script that is being used by the product team in our testing of Certificate Services. SetupCA.vbs was designed to have the functionality present in the setup UI but in an easy command line that can be used in automation. Most of the functionality of the script is fairly straight forward in just setting properties on the setup object. A couple of features, like the key/cert re-use, take a bit of code to get the setting right.&lt;/P&gt;
&lt;P&gt;All of the ICertSrvSetup COM object properties and methods are documented in the MSDN at &lt;A title=http://msdn.microsoft.com/en-us/library/bb736371%28VS.85%29.aspx href="http://msdn.microsoft.com/en-us/library/bb736371%28VS.85%29.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb736371%28VS.85%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb736371%28VS.85%29.aspx&lt;/A&gt;.&lt;/P&gt;
&lt;P align=left&gt;The setup script is attached to this post, simply click the link for setupca.vbs and save the file to your local system.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some example usages of the script:&lt;/P&gt;
&lt;P&gt;Install Enterprise Root CA&lt;BR&gt;Cscript setupca.vbs /ie /sn MyRootCA /sk 4096 /sp "RSA#Microsoft Software Key Storage Provider" /sa SHA256&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Install Standalone Sub CA&lt;BR&gt;Cscript setupca.vbs /it /sn MySubCA /sr MyParentCAMachine\MyRootCA /sk 384 /sp "ECDSA_P384#Microsoft Software Key Storage Provider" /sa SHA1&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Uninstall CA:&lt;BR&gt;Cscript setupca.vbs /uc&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Install Web Pages:&lt;BR&gt;Cscript setupca.vbs /iw /sr MyParentCAMachine\MyRootCA&lt;/P&gt;
&lt;P&gt;There is also a usage that lists all the parameters if you run the script without any arguments.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;UPDATE: Script has been updated to include option for offline requests using new /OR switch. Example:&lt;/P&gt;
&lt;P align=left&gt;Install Enterprise Sub CA saving request to a file: 
&lt;P align=left&gt;Cscript setupca.vbs /if /sn "My Sub CA" /sp "RSA#Microsoft Software Key Storage Provider" /sk 4096 /or "c:\temp\ca.req" &lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3281975" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/pki/attachment/3281975.ashx" length="43690" type="application/octet-stream" /><category domain="http://blogs.technet.com/pki/archive/tags/Configuration/default.aspx">Configuration</category><category domain="http://blogs.technet.com/pki/archive/tags/setup/default.aspx">setup</category><category domain="http://blogs.technet.com/pki/archive/tags/Certification+authority/default.aspx">Certification authority</category></item><item><title>How to get request statistics by template in PowerShell</title><link>http://blogs.technet.com/pki/archive/2009/09/10/how-to-get-request-statistics-by-template-in-powershell.aspx</link><pubDate>Thu, 10 Sep 2009 02:03:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3280211</guid><dc:creator>alrad</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/pki/comments/3280211.aspx</comments><wfw:commentRss>http://blogs.technet.com/pki/commentrss.aspx?PostID=3280211</wfw:commentRss><description>&lt;P&gt;I’ve been working with our support folks helping one of our customers. One of the things we wanted to learn about the environment is how many requests have been made for each certificate template that they issue. We have come up with this PowerShell script that you can run against a CA to find out. &lt;/P&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;&lt;STRONG&gt;Disclaimer&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1 face=Courier&gt;certutil -view -out CertificateTemplate -restrict "NotBefore &amp;gt; 08/20/2009" csv &amp;gt; out.txt &lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1 face=Courier&gt;$FileContents = gc out.txt &lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1 face=Courier&gt;write-host "Total rows:" $FileContents.length &lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1 face=Courier&gt;$GroupedCounts = $FileContents | group | sort count –Descending &lt;BR&gt;$GroupedCounts | format-table Count,Name -auto&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The output will look something like this:&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1 face=Courier&gt;Total rows: 10 &lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1 face=Courier&gt;Count Name &lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1 face=Courier&gt;----- ---- &lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1 face=Courier&gt;4 "1.3.6.1.4.1.311...X &lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1 face=Courier&gt;3 "1.3.6.1.4.1.311...Y &lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1 face=Courier&gt;1 "8/20/2009 12:00 AM""Certificate Template" &lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1 face=Courier&gt;1 "DomainController" &lt;BR&gt;1 "EMPTY"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Let’s take a look at the script closely and also talk about what can be tweaked. &lt;/P&gt;
&lt;P&gt;First, we run a certutil.exe to dump the template’s name or OID. The V1 templates are recorded by their name and V2/V3 templates are recorded by their OID. You can see template OIDs with the certutil.exe -template command. You can’t see it in the template snapin UI. &lt;/P&gt;
&lt;P&gt;Note that we restrict the output by date. Some other filters that could be useful are CertificateTemplate and Request.StatusCode if you want to get counts for only template or if you’re only interested in failed requests for example. We pipe the output into a text file. We also use the -csv option so that our output is easier to consume for automation.&lt;/P&gt;
&lt;P&gt;We then group the output by the template name/OID and sort it based on the count in the descending order. Finally we output it as a table. &lt;/P&gt;
&lt;P&gt;Now let’s take a look at the output. Note that the last and third line from the bottom contains garbage. If you’re going to use the output of this script in some automation, you would need to get rid of those entries. They are simply an artifact of the certutil.exe output. &lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3280211" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/pki/archive/tags/certutil/default.aspx">certutil</category><category domain="http://blogs.technet.com/pki/archive/tags/Certification+authority/default.aspx">Certification authority</category><category domain="http://blogs.technet.com/pki/archive/tags/powershell/default.aspx">powershell</category></item><item><title>CA performance</title><link>http://blogs.technet.com/pki/archive/2009/05/14/ca-performance.aspx</link><pubDate>Thu, 14 May 2009 17:26:04 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3241222</guid><dc:creator>MS2065</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/pki/comments/3241222.aspx</comments><wfw:commentRss>http://blogs.technet.com/pki/commentrss.aspx?PostID=3241222</wfw:commentRss><description>&lt;p&gt;Back in the year 2003 we have published information about the CA performance and how it is impacted by various factors. The TechNet article is called &lt;a href="http://technet.microsoft.com/en-us/library/cc778985.aspx"&gt;Evaluating CA Capacity, Performance, and Scalability&lt;/a&gt; and is more or less still valid. You may transform the enrollment numbers to current hardware capabilities.&lt;/p&gt; &lt;p&gt;One thing that I would like to point out here is the article’s statement about key-length. Key generation cost increases with key size, but that burden is borne by the client (remember the certificate enrollment flow as documented in &lt;a href="http://technet.microsoft.com/en-us/library/cc776447.aspx"&gt;How Certificates Work&lt;/a&gt; under heading &lt;em&gt;How Certificates Are Created&lt;/em&gt;). Therefore, the performance of the CA my only change with different key length if key archival is used. Then the CA will verify the public-private key pair match by performing a round trip encryption/decryption. If key archival is not used, the key length is neutral to the CA performance.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3241222" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/pki/archive/tags/Certification+authority/default.aspx">Certification authority</category></item></channel></rss>