Retrives the maximum validity period value for issued certificates.
Get-CertificateValidityPeriod [-CertificationAuthority] <CertificateAuthority[]> [<CommonParameters>]
Retrieves maximum validity period for issued certificates. Though this setting is not absolute. Certificate actual validity period is the lesser value of the following: for Standalone CA:
- estimated CA certificate validity period
- ValidityPeriod parameter value.
for Enterprise CA:
- estimated CA certificate validity period
- certificate template validity period value
- ValidityPeriod parameter value.
Specifies the Certification Authority object. This object can be retrieved by running Get-CertificationAuthority command.
Required? | True |
Position? | 0 |
Default value | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, InformationAction, InformationVariable,
WarningAction, WarningVariable, OutBuffer, PipelineVariable and OutVariable.
For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
PKI.CertificateServices.CertificateAuthority
PKI.CertificateServices.CertValidityPeriod
Author: Vadims Podans
Blog: https://www.sysadmins.lv
PS C:\> Get-CertificationAuthority -Name Company-CA | Get-CertificateValidityPeriod
Returns validity period settings for 'Company-CA' CA server.
PS C:\> Get-CertificationAuthority | Get-CertificateValidityPeriod
Returns validity period settings for all Enterprise CA servers.
PS C:\> Get-CertificationAuthority -Name Company-CA | Get-CertificateValidityPeriod | Set-CertificateValidityPeriod "10 years" -RestartCA
Sets certificate issued certificate validity period to '10 years'. After configuration is changed, the command will restart certificate services to immediately apply changes.
PS C:\> Get-CertificationAuthority | Get-CertificateValidityPeriod | Set-CertificateValidityPeriod "5 years" -RestartCA
Sets certificate issued certificate validity period to '5 years' for all Enterprise CAs in the current forest and restarts CA service. After configuration is changed, the command will restart certificate services to immediately apply changes.
Get-CertificationAuthority
Connect-CertificationAuthority
Set-CertificateValidityPeriod