You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding possibility to set SAN when using New-PnPAzureCertificate (#3555)
* Adding possibility to set the Subject Alternative Names on the self signed certificate
* Adding changelog entry
---------
Co-authored-by: Gautam Sheth <gautamdsheth@outlook.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
41
41
- Added `-RelativeUrl` parameter to `Connect-PnPOnline` cmdlet to allow specifying custom URLs for usage with `-WebLogin` method. [#3530](https://github.com/pnp/powershell/pull/3530)
42
42
- Added `-RetryCount` to `Submit-PnPSearchQuery` which allows for specifying the number of retries to perform when an exception occurs [#3528](https://github.com/pnp/powershell/pull/3528)
43
43
- Added `-MailNickname` parameter to `Set-PnPMicrosoft365Group` cmdlet to allow changing of this property on a Microsoft 365 Group [#3529](https://github.com/pnp/powershell/pull/3529)
44
+
- Added `-SanNames` to `New-PnPAzureCertificate` which allows for controlling the Subject Alternative Names set on the generated certificate [#3555](https://github.com/pnp/powershell/pull/3555)
44
45
- Added Information Barriers information to the output of `Get-PnPTenantSite`[#3556](https://github.com/pnp/powershell/pull/3556)
45
46
- Added `RequestFilesLinkEnabled` and `RequestFilesLinkExpirationInDays` to the output of `Get-PnPSite`[#3557](https://github.com/pnp/powershell/pull/3557)
46
47
- Added `CoreRequestFilesLinkEnabled`, `CoreRequestFilesLinkExpirationInDays`, `OneDriveRequestFilesLinkEnabled`, `OneDriveRequestFilesLinkExpirationInDays`, `BusinessConnectivityServiceDisabled` to the output of `Get-PnPTenant`[#3557](https://github.com/pnp/powershell/pull/3557)
This will generate a default self-signed certificate named "pnp.contoso.com" valid for 10 years and output a pfx and cer file to disk. The private key file (pfx) will not be password protected.
42
+
This will generate a default self-signed certificate named "pnp.contoso.com" valid for 10 years and output a pfx and cer file to disk. The private key file (pfx) will not be password protected. It will have localhost and the machinename as the Subject Alternative Names.
43
43
44
44
### EXAMPLE 2
45
45
```powershell
46
46
New-PnPAzureCertificate -CommonName "My Certificate" -ValidYears 30
47
47
```
48
48
49
-
This will output a certificate named "My Certificate" which expires in 30 years from now to the screen. It will not write the certificate files to disk.
49
+
This will output a certificate named "My Certificate" which expires in 30 years from now to the screen. It will not write the certificate files to disk. It will have localhost and the machinename as the Subject Alternative Names.
This will generate a default self-signed certificate named "pnp.contoso.com" valid for 10 years and output a pfx and cer file to disk. The pfx file will have the password pass@word1 set on it.
56
+
This will generate a default self-signed certificate named "pnp.contoso.com" valid for 10 years and output a pfx and cer file to disk. The pfx file will have the password pass@word1 set on it. It will have localhost and the machinename as the Subject Alternative Names.
This will generate a default self-signed certificate named "pnp.contoso.com" valid for 10 years and output a pfx and cer file to disk. There will not be any Subject Alternative Names in the generated certificate.
57
64
58
65
## PARAMETERS
59
66
@@ -169,6 +176,24 @@ Accept pipeline input: False
169
176
Accept wildcard characters: False
170
177
```
171
178
179
+
### -SanNames
180
+
One or more DNS names to add to the certificate as Subject Alternative Names. Separate multiple names with a comma, i.e. "host1.domain.com","host2.domain.com".
181
+
182
+
Provide $null to not add any Subject Alternative names to the certificate.
183
+
184
+
Omit to add localhost and the machine name as Subject Alternative Names.
0 commit comments