Export-SCACAesKey

Applies To: System Center 2012 R2 App Controller

Export-SCACAesKey

Exports the App Controller AES key from the registry to the specified file.

Syntax

Parameter Set: Default
Export-SCACAesKey [-Path] <String> [-Password] <SecureString> [ <CommonParameters>]

Detailed Description

The Export-SCACAESKey cmdlet exports the App Controller Advanced Encryption Standard (AES) key from the registry to the specified file. Use the Path parameter to specify the destination file.

You must run the App Controller command shell as Administrator when using this cmdlet. This cmdlet must be run on the computer on which App Controller is installed.

NOTE: Prior to running this cmdlet, you must create a connection to the App Controller server by using the Get-SCACServer cmdlet.

Parameters

-Password<SecureString>

Specifies a secure string that contains a password.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

Specifies a file location path.

Aliases

none

Required?

true

Position?

1

Default Value

none

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.

Inputs

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

  • System.String, System.Security.SecureString

Outputs

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

Examples

Example 1: Export the AES key to a file

The first command prompts you to supply credentials with permission to connect with the App Controller server, and stores the credentials in the $Credentials parameter.

The second command establishes a connection to the App Controller server named AppControllerSvr01 using the credentials stored in $Credentials.

The third command creates a secure string for the provided password and stores the secure string in the $Password variable.

The last command exports the App Controller AES key to the Key.txt file at the specified file path using the password stored in $Password.

PS C:\> $Credentials = Get-Credential
PS C:\> Get-SCACServer -ServerName "https://AppControllerSvr01.Contoso.com" -Credential $Credentials
PS C:\> $Password = ConvertTo-SecureString "PassWord!" -AsPlainText -Force
PS C:\> Export-SCACAESKey -Path "C:\Keys\Key.txt" -Password $Password

Get-SCACServer