Posts on this page:

New year and new post :)

New release

Yesterday I released a new version of PS Cmdlet Help Editor on CodePlex. Essentially this version is the same as previously published beta. Refer to this post to get details about new version: PS Cmdlet Help Editor v3.3.5.0 Beta. I just addressed and fixed issues reported by users and believe, now it is safe for use.


Read more →

Recently I started another work on PKI task automation with PowerShell – PKI Health Tool (aka Enterprise PKI or pkiview.msc). As a start point I took pkiview.msc MMC snap-in functionality which consist of:

  1. Enumerate all Enterprise CAs in the forest. Filter inaccessible CAs;
  2. Retrieve the most recent CA Exchange certificate for each CA;
    1. Execute chain for each certificate to select trusted anchors and to go through the chain;
  3. retrieve all Issuer URLs from AIA;
    1. Validate each url (must be either http or ldap) and attempt to download the contents;
    2. If contents is downloaded, verify whether it is a certificate;
      1. Verify if the downloaded certificate is an issuer of CA Exchange certificate;
      2. Validate other cert properties;
  4. Extract URLs from CDP extension;
    1. Validate each url (must be either http or ldap) and attempt to download the contents;
    2. If contents is downloaded, verify whether it is a CRL;
      1. Validate basic CRL properties, like validity (not yet valid, expired, about to expire);
      2. Validate whether the CRL has valid signature (against CA certificate);
    3. Do the same for DeltaCRLs;
  5. Extract all OCSP URLs from AIA extension;
    1. Validate OCSP response by sending OCSP request and processing response;
  6. Compose status report (managed, I maintain report object and you can access report properties);
  7. Repeat steps 3-6 for each subsequent certificate in the chain up to root certificate;
  8. Compose summary report.

Read more →

I was silent recently, because the blog was down. SharePoint is a nightmare for me. Hopefully, I’m writing my own web site with ASP.NET MVC and have plans to move to a reliable hosting in near future.

Today I want to discuss the question about extracting relative distinguished name (RDN) attributes from X.500 full distinguished name (DN) in PowerShell.


Read more →

Today I have published a new version of PowerShell Cmdlet Help Editor which includes only one major change and number of minor changes.

Notable changes

Main change is tabbed document introduction:


Read more →

In previous post I talked about weirdness in CNG support in .NET and showed an example how to fill the gaps in .NET. That was just an example. Today I will show how to perform basic cryptographic operations with CNG in PowerShell and other CLR languages (C#, VB.NET). PowerShell is built on top of CLR, so the techniques are almost identical, despite a bit different syntax.

So, today I will show how to sign the data with CNG certificate. The easiest way is to use NCrypt* unmanaged function family exposed by NCRYPT.DLL.


Read more →