Pki

Extracting objects from commands that output text

There are many ways to throw a spanner. But if you really must throw it with powershell you’ll want it to result in an object.

The versatility of objects can give much to legacy commands that still linger in the Windows administration world. This short tutorial should teach you to turn most legacy commands into one or more commandlets in some concise code.

Generate an SHA-1 signed certificate after cutover to SHA-2

You’ve finally made the switch on your Microsoft AD CS PKI infrastructure to SHA2 (SHA256)… but there is always one. One outlier application that won’t accept an SHA-2 certificate and needs an SHA1 certificate to keep chugging for 1 more year. Don’t worry, you can switch your Active Directory Certificate Services PKI infrastructure back to SHA-1 for a little bit. certutil -setreg ca\csp\CNGHashAlgorithm SHA1 restart-service certsvc Now issue your certificate, and switch back.