Skip to content

Commit ca8d8c4

Browse files
committed
Add PSScriptInfo
1 parent b21b68b commit ca8d8c4

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

Request-Certificate.ps1

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,38 @@
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+
<#
236
.SYNOPSIS
337
Requests a certificate from a Windows CA
438
@@ -69,7 +103,7 @@ Exports the certificate and private key to a pfx file instead of installing it i
69103
By default the certificate will be installed in the local computer store.
70104
71105
.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.
73107
74108
.PARAMETER Password
75109
Specify the Password (as plain String or SecureString) used on the export.
@@ -361,7 +395,7 @@ CertificateTemplate = "$TemplateName"
361395
Write-Debug "export parameter is set. => export certificate"
362396
Write-Verbose "exporting certificate and private key"
363397
$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"
365399

366400
#create a pfx export as a byte array
367401
if($Password) {

0 commit comments

Comments
 (0)