-
Notifications
You must be signed in to change notification settings - Fork 370
Allow using custom Auth Certificate lifetime #2347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lusassl-msft
wants to merge
8
commits into
main
Choose a base branch
from
lusassl-AuthCertLifetime
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
61b2af2
Allow using custom Auth Certificate lifetime in MonitorExchangeAuthCe…
lusassl-msft 202b3a8
Fix ValidateScript issue
lusassl-msft eb0a22d
Add parameter to enforce new Auth Certificate creation
lusassl-msft 3b4b97f
Enable enforced Auth Certificate as soon as possible
lusassl-msft 7d13e5b
Some more adjustments
lusassl-msft 95318ed
Fix typos
lusassl-msft 3b16892
Support SupportsShouldProcess
lusassl-msft 8e966c8
Typo fixed
lusassl-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -22,6 +22,11 @@ | |||||
| .PARAMETER ValidateAndRenewAuthCertificate | ||||||
| You can use this parameter to let the script perform the required Auth Certificate renewal actions. | ||||||
| If the script runs with this parameter set to $false, no action will be made to the current Auth Configuration. | ||||||
| .PARAMETER EnforceNewAuthCertificateCreation | ||||||
| You can use this switch parameter to let the script stage a new next Auth Certificate which will become automatically active within 24 hours. | ||||||
| .PARAMETER CustomCertificateLifetimeInDays | ||||||
| You can use this parameter to specify a custom lifetime for the newly created Auth certificate. | ||||||
| By default, the self-signed certificate is created with a lifetime of 5 years. | ||||||
| .PARAMETER IgnoreUnreachableServers | ||||||
| This optional parameter can be used to ignore if some of the Exchange servers within the organization cannot be reached. | ||||||
| If this parameter is used, the script only validates the servers that can be reached and will perform Auth Certificate | ||||||
|
|
@@ -67,6 +72,17 @@ | |||||
| .\MonitorExchangeAuthCertificate.ps1 -ValidateAndRenewAuthCertificate $true -Confirm:$false | ||||||
| Runs the script in renewal mode without user interaction. The Auth Certificate renewal action will be performed (if required). | ||||||
| In unattended mode the internal SMTP certificate will be replaced with the new Auth Certificate and is then set back to the previous one. | ||||||
| The new Auth Certificate, which is eventually created, will have a lifetime of 5 years. | ||||||
| .EXAMPLE | ||||||
| .\MonitorExchangeAuthCertificate.ps1 -ValidateAndRenewAuthCertificate $true -CustomCertificateLifetimeInDays 365 -Confirm:$false | ||||||
| Runs the script in renewal mode without user interaction. The Auth Certificate renewal action will be performed (if required). | ||||||
| In unattended mode the internal SMTP certificate will be replaced with the new Auth Certificate and is then set back to the previous one. | ||||||
| The new Auth Certificate, which is eventually created, will be created with a lifetime of 365 days (1 year). | ||||||
| .EXAMPLE | ||||||
| .\MonitorExchangeAuthCertificate.ps1 -EnforceNewAuthCertificateCreation -CustomCertificateLifetimeInDays 365 -Confirm:$false | ||||||
| Runs the script in Auth Certificate enforcement mode.A new Auth Certificate is created and staged as new next Auth Certificate. | ||||||
|
||||||
| Runs the script in Auth Certificate enforcement mode.A new Auth Certificate is created and staged as new next Auth Certificate. | |
| Runs the script in Auth Certificate enforcement mode. A new Auth Certificate is created and staged as new next Auth Certificate. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
New-ExchangeSelfSignedCertificatefunction returns a PSCustomObject with Subject and Thumbprint properties, whileNew-ExchangeCertificatelikely returns a different object structure. This inconsistency may cause issues in subsequent code that expects a specific object format.