|
1 | | -<# |
| 1 | +<#PSScriptInfo |
| 2 | +
|
| 3 | +.VERSION 1.5.0 |
| 4 | +
|
| 5 | +.GUID eb791b3e-fbbe-4685-8c92-5eb0f05688b6 |
| 6 | +
|
| 7 | +.AUTHOR Jonas Feller c/o J0F3 |
| 8 | +
|
| 9 | +.COMPANYNAME jfe.cloud |
| 10 | +
|
| 11 | +.COPYRIGHT (c) 2020 Jonas Feller. All rights reserved. |
| 12 | +
|
| 13 | +.TAGS PSEdition_Desktop Certificate ActiveDirectory ActiveDirectoryCertificateServices Security |
| 14 | +
|
| 15 | +.LICENSEURI |
| 16 | +
|
| 17 | +.PROJECTURI https://github.com/J0F3/PowerShell |
| 18 | +
|
| 19 | +.ICONURI |
| 20 | +
|
| 21 | +.EXTERNALMODULEDEPENDENCIES |
| 22 | +
|
| 23 | +.REQUIREDSCRIPTS |
| 24 | +
|
| 25 | +.EXTERNALSCRIPTDEPENDENCIES |
| 26 | +
|
| 27 | +.RELEASENOTES |
| 28 | +Kudos to jbpaux for contributing improvements and fixes on GitHub! |
| 29 | +- New switch parameter "AddCNinSAN" to automatically populate SAN with the CN. (PR #15) |
| 30 | +- Fixes an issue with naming ot the file when a wildcard (*) certificate is requested. (PR #14) |
| 31 | +- Improved outputs when requesting SAN certificate. (PR #13) |
| 32 | +- Fixes an issue where the request .inf file was not correctly formated when requesting a SAN certificate. (Kudos to smanross, PR #5) |
| 33 | +#> |
| 34 | + |
| 35 | +<# |
2 | 36 | .SYNOPSIS |
3 | 37 | Requests a certificate from a Windows CA |
4 | 38 |
|
@@ -69,7 +103,7 @@ Exports the certificate and private key to a pfx file instead of installing it i |
69 | 103 | By default the certificate will be installed in the local computer store. |
70 | 104 |
|
71 | 105 | .PARAMETER ExportPath |
72 | | -Path to wich the pfx file should be saved when -Export is specified. |
| 106 | +Path to which the pfx file should be saved when -Export is specified. |
73 | 107 |
|
74 | 108 | .PARAMETER Password |
75 | 109 | Specify the Password (as plain String or SecureString) used on the export. |
@@ -361,7 +395,7 @@ CertificateTemplate = "$TemplateName" |
361 | 395 | Write-Debug "export parameter is set. => export certificate" |
362 | 396 | Write-Verbose "exporting certificate and private key" |
363 | 397 | $cert = Get-Childitem "cert:\LocalMachine\My" | where-object {$_.Thumbprint -eq (New-Object System.Security.Cryptography.X509Certificates.X509Certificate2((Get-Item $cer).FullName, "")).Thumbprint} |
364 | | - Write-Debug "Certificate found in computerstore: $cert" |
| 398 | + Write-Debug "Certificate found in computer store: $cert" |
365 | 399 |
|
366 | 400 | #create a pfx export as a byte array |
367 | 401 | if($Password) { |
|
0 commit comments