PlagueHO / LabBuilder

PowerShell Module for building a Hyper-V Lab environment from a simple XML configuration file.
MIT License
226 stars 38 forks source link

dsclibrary/STANDALONE_ROOTCA.DSC.ps1 Enhancements #323

Open kungfoome opened 5 years ago

kungfoome commented 5 years ago

Some potential enhancements for the ROOTCA script. This is more for when a resource is created for the advanced cert config and thoughts to consider when putting it together.

            CRLPublicationURLs        = '65:C:\Windows\system32\CertSrv\CertEnroll\%3%8%9.crl\n79:ldap:///CN=%7%8,CN=%2,CN=CDP,CN=Public Key Services,CN=Services,%6%10\n6:http://pki.contoso.com/CertEnroll/%3%8%9.crl'
            CACertPublicationURLs     = '1:C:\Windows\system32\CertSrv\CertEnroll\%1_%3%4.crt\n2:ldap:///CN=%7,CN=AIA,CN=Public Key Services,CN=Services,%6%11\n2:http://pki.contoso.com/CertEnroll/%1_%3%4.crt'

Would be nice to break that out into an array instead.

Also, %3, may want to make that a little cleaner as well. Something without spaces maybe. For example, instead of

CACommonName = 'My Root Certificate Authority' which would make C:\Windows\system32\CertSrv\CertEnroll\My Root Certificate Authority%8%9.crl, it might be good to do something like

C:\Windows\system32\CertSrv\CertEnroll\My_Root_Certificate_Authority%8%9.crl

Something to think about.

PlagueHO commented 5 years ago

Thanks @kungfu71186 - I'll do a big batch of fixes on Thursday night (snowed under the next two nights).

PlagueHO commented 5 years ago

Great ideas BTW!

PlagueHO commented 5 years ago

Now that this PR is through (and will be released later this week) I'll be able to convert the DSC configs to use it and implement your recommendations more easily.