New-RDMVaultCustomVariable
Synopsis
Create a new custom variable object for a vault.
Syntax
__AllParameterSets
New-RDMVaultCustomVariable [-Name] <string> [-Value] <string> [[-Description] <string>] [-Set]
[-VaultMode <VaultMode>] [-ForcePromptAnswer <DialogResult[]>] [<CommonParameters>]Description
Create a new custom variable object for a vault. Use -Set to persist the variable immediately, or pipe the result to Set-RDMVaultCustomVariable to persist it later. This command is not available on the system vault.
Examples
Example 1
PS C:\> $var = New-RDMVaultCustomVariable -Name MyVarName -Value MyVarValue -Description MyVarDesc -SetCreate a custom variable and persist it to the vault immediately.
Example 2
PS C:\> $var1 = New-RDMVaultCustomVariable -Name 'Var1' -Value 'Value1'
PS C:\> $var2 = New-RDMVaultCustomVariable -Name 'Var2' -Value 'Value2'
PS C:\> Set-RDMVaultCustomVariable -Variable $var1, $var2Add multiple variables to the current vault.
Parameters
-Description
Description of the variable
-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.
-Name
Name of the variable. Two special characters can be used: '_' everywhere and '$' at the start and the end. Other characters are not allowed. All lowercase letters will be converted to uppercase.
-Set
Persist the variable to the vault immediately after creation.
-Value
Value of the variable
-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.
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.
Outputs
RemoteDesktopManager.PowerShellModule.PSOutputObject.PSVaultVariable
Notes
For more information, type "Get-Help New-RDMVaultCustomVariable -detailed". For technical information, type "Get-Help New-RDMVaultCustomVariable -full".
Last updated
Was this helpful?