Set-RDMEntryPrivateKey
Synopsis
Set the public and private keys in an entry
Syntax
__AllParameterSets
Set-RDMEntryPrivateKey [-Key] <PSSSHKey> -InputObject <PSConnection> [-PassThru] [-Set]
[-VaultMode <VaultMode>] [-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm]
[<CommonParameters>]Description
Set the public and private keys for an entry. The Key parameter must be generated using the New-RDMSshKey cmdlet. The InputObject parameter accepts either the entry's ID or an entry object returned by the Get-RDMEntry cmdlet. To use this cmdlet, the user must have permission to edit the entry or add a new one. Only PrivateKey credentials are supported.
Examples
Example 1
PS C:\> $entryId = '12345678-1234-1234-1234-123412345678'
PS C:\> $newKey = New-RDMSshKey -Algorithm RSA -Format PKCS1 -Size 2048
PS C:\> Set-RDMEntryPrivateKey -Key $newKey -InputObject $entryId -SetChange the public and private keys and private an existing SSH credential entry
Example 2
Save a new SSH credential entry with the generated public and private keys
Parameters
-Confirm
Prompts for confirmation before running the cmdlet.
-ForcePromptAnswer
Switch to use with caution. It will automatically answer prompt asking yes/no, yes/no/cancel, or ok/cancel questions. In case of multiple prompts, multiple values can be passed to this parameter. Here are the accepted values:
Yes: Accept the prompt. Cover the OK and Automatic value.
No: Refuse the yes/no/cancel prompt. "Cancel" is the fallback option if there is no "No" option.
Cancel: Cancel the yes/no/cancel prompt. "No" is the fallback option if there is no "Cancel" option.
-InputObject
Entry to set the public and private keys.
-Key
Key object obtained from New-RDMSshKey
-PassThru
Enables the cmdlet to output objects it has processed, useful for further pipeline processing or inspection.
-Set
Save the modified entry
-VaultMode
Vault where the command will be applied. Three choices are offered: - Default: Current vault that has been set. - User: Vault specific to the current user. - Global: Global vault of the workspace.
-WhatIf
Shows what would happen if the cmdlet were to run. The cmdlet does not run.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection
Entry to modify. Either specified by its ID, or obtained from Get-RDMEntry.
Outputs
RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection
PSConnection object returned when the PassThru is used
Notes
For more information, type "Get-Help Set-RDMEntryPrivateKey -detailed". For technical information, type "Get-Help Set-RDMEntryPrivateKey -full".
Last updated
Was this helpful?