Restore-CARoleService

Restores the CA database and private key information.

Syntax

Restore-CARoleService
       [-Path] <String>
       [-Force]
       [-KeyOnly]
       [-Password <SecureString>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Restore-CARoleService
       [-Path] <String>
       [-Force]
       [-DatabaseOnly]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Restore-CARoleService
       [-Path] <String>
       [-Force]
       [-Password <SecureString>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

The Restore-CARoleService cmdlet restores the certification authority (CA) database and private key information.

Examples

Example 1: Restore the CA private key and certificate

PS C:\> Restore-CARoleService -Path "C:\CABackup"

This command restores the CA private key and certificate from the specified path.

Example 2: Restore the CA database only

PS C:\> Restore-CARoleService -Path "C:\CABackup" -DatabaseOnly

This command restores the CA database from the specified path. The command does not restore the CA private key information.

Example 3: Restore the CA key only

PS C:\> Restore-CARoleService -Path "C:\CABackup" -KeyOnly

This command restores the CA private key information to the specified path. The command does not restore the CA database.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DatabaseOnly

Indicates that the cmdlet restores only the certification authority database.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-KeyOnly

Indicates that the cmdlet restores only the certification authority private key and certificate.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Password

Specifies a password, as a secure string, to access the private key and certificate information. To obtain a secure string, use the ConvertTo-SecureString cmdlet. For more information, type Get-Help ConvertTo-SecureString.

Type:SecureString
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Path

Specifies the directory from which the cmdlet restores the CA database and private key. The cmdlet restores the database from the subdirectory named Database in the path that you specified when you backed up the CA database. The cmdlet restores the private key from the .p12 file that you backed up in the Database subdirectory in the path that you specify.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

SwitchParameter

SecureString

Outputs

Void