PowerShell Module
This module allows management of the certdog application from the command line, or can be integrated with your own scripts
Running from the Command Line
Open a PowerShell window as Administrator
Navigate to [certdog install]\bin
e.g. c:\certdog\bin
Import the module:
Import-Module .\certdog-module.psm1
To view the available commands run:
Get-Command -Module certdog-module
Login with:
login -username [username] -password [password]
Or just type login
to be prompted
Examples
Show available Certificate Issuers:
Get-Cas
or
Get-Cas | Format-Table
Show available CSR Generators:
Get-CsrGenerators
Request a certificate from a CSR (provided as a file):
Request-CertP10 -caName "Microsoft TLS" -csrFilename C:\Downloads\server22.certdog.local.csr
Where caName is the issuer name as configured within Certdog. This is the name that will be displayed when the cas
command is run (above)
Request a certificate from a CSR (provided as data within a variable):
# Read the CSR data
$csrData = Get-Content C:\Downloads\server22.certdog.local.csr
# Send to Certdog
Request-CertP10 -caName "Microsoft TLS" -csr $csrData
Request a certificate with Certdog creating the CSR:
$cert = Request-Cert -dn "CN=PowerShell Test,C=GB" -caName "Microsoft TLS" -csrGeneratorName "RSA 2048 Generator" -p12Password "password"
Then save as a PFX
Set-Content -Path C:\Downloads\powershell.pfx -Value $cert.p12Data