Quantcast
Channel: Public Key Infrastructure PowerShell module
Viewing all articles
Browse latest Browse all 729

Updated Wiki: Set-CertificateValidityPeriod

$
0
0

[This command requires installed Remote Server Administration Tools (RSAT)]

Name

Set-CertificateValidityPeriod

SYNOPSIS

Sets maximum validity period for issued certificates.

SYNTAX

Set-CertificateValidityPeriod [-InputObject] <CertValiditySetting[]> [-ValidityPeriod] <String> [-RestartCA] [<CommonParameters>]

DESCRIPTION

Sets maximum validity period for issued certificates. 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.

PARAMETERS

-InputObject<CertValiditySetting[]>

Must be existing CertValidityPeriod object that contains current issued certificate validity settings. This object can by retrieved by running Get-CertificateValidityPeriod command.

Required?True
Position?0
Default value 
Accept pipeline input?true (ByValue, ByPropertyName)
Accept wildcard characters?False

-ValidityPeriod<String>

Specifies new issed certificate validity settings. Must be set in the format: 'Digit PeriodUnit'. For example, '5 years'. Possible values for PeriodUnit are:
- Hours
- Days
- Weeks
- Months
- Years

Required?True
Position?1
Default value 
Accept pipeline input?false
Accept wildcard characters?False

-RestartCA<SwitchParameter>

Restarts CA service on the specified CA server to immediately apply changes.

Required?False
Position?named
Default value 
Accept pipeline input?false
Accept wildcard characters?False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
bout_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

PKI.CertificateServices.CertValidityPeriod

OUTPUTS

PKI.CertificateServices.CertValidityPeriod

NOTES

Author: Vadims Podans
Blog: http://en-us.sysadmins.lv

EXAMPLES

-------------- Example 1 --------------

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.

-------------- Example 2 --------------

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.

RELATED LINKS

Get-CertificationAuthority
Connect-CertificationAuthority
Get-CertificateValidityPeriod

PowerShell Requirements

  • PowerShell 2.0

Operating System Requirements

  • Windows Server 2003 all editions
  • Windows Server 2008 all editions
  • Windows Server 2008 R2 all editions
  • Windows Server 2012 all editions
  • Windows Server 2012 R2 all editions

Viewing all articles
Browse latest Browse all 729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>