Skip to main content

Add-LXCAStoredCredential

This cmdlet creates a stored credential in the Lenovo XClarity Administrator server. There are two types of stored credentials: management and recovery. When you create a recovery stored credential, RECOVERY_ID is used as the user name.

Note
You cannot pipe objects to this cmdlet.

Syntax

Add-LXCAStoredCredential [-Connection LXCAConnection] 
[-Description String]
-Password SecureString
-UserName String
[CommonParameter]

Add-LXCAStoredCredential [-Connection LXCAConnection]
[-Description String]
-Password SecureString
-RecoveryCredential
[CommonParameter]

Parameters

-Connection LXCAConnection
Specifies the connection to the Lenovo XClarity Administrator server. If no connection is specified, the result from the last Connect-LXCA cmdlet is used.
-Description String
Specifies the description of the new stored credential.
-Password SecureString
Specifies the password for the new stored credential.
-UserName String
Specifies the user name for the new stored credential.
-RecoveryCredential
Indicates that the stored credential that is designated for recovery purposes. In this case, credential’s UserName is always RECOVERY_ID.

If not specified, the stored credential that is designated for management purposes

CommonParameters
This cmdlet supports the following common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer, -PipelineVariable, -OutVariable. For detailed information about each common parameter, see the Microsoft PowerShell Common Parameters webpage.

Results

This cmdlet returns a StoredCredentialData object.

Examples

The following example creates a management stored credential.
$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Credential $cred

$pwd = ConvertTo-SecureString "Passw0rd" -AsPlainText –Force
$account = Add-LXCAStoredCredential -UserName USERID1 -Password $pwd

Disconnect-LXCA
The following example creates a recovery stored credential.
$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Credential $cred

$pwd = ConvertTo-SecureString "Passw0rd" -AsPlainText –Force
$account = Add-LXCAStoredCredential -Password $pwd -RecoveryCredential

Disconnect-LXCA