Restore-CARoleService

Restore-CARoleService

Restores the CA database and private key information.

Syntax

Parameter Set: All
Restore-CARoleService [-Path] <String> [-Force] [-Password <SecureString> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: Database
Restore-CARoleService [-Path] <String> -DatabaseOnly [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: Key
Restore-CARoleService [-Path] <String> -KeyOnly [-Force] [-Password <SecureString> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

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

Parameters

-DatabaseOnly

Indicates that the cmdlet restores only the certification authority database.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Force

Forces the command to run without asking for user confirmation.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-KeyOnly

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Password<SecureString>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Path<String>

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.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Restore the CA private key and certificate

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

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

Example 2: Restore the CA database only

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

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

Example 3: Restore the CA key only

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

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

Backup-CARoleService