Export-RDMCustomVariable

Synopsis

Export custom variables to a .json file.

Syntax

__AllParameterSets

Export-RDMCustomVariable [-FilePath] <string> [-VariableScope] <CustomVariableScope> [-NoClobber]
 [-ForcePromptAnswer <DialogResult[]>] [<CommonParameters>]

Description

Export custom variables to a .json file. Three types of custom variables are available: associated with the current data source, associated with the current vault, and associated with the application's option settings.

Examples

Example 1

PS C:\> Export-RDMCustomVariable -FilePath "C:\Users\admin\Desktop\Custom_variables.json" -VariableType DataSource

Export all variables from the data source settings to the file Custom_variables.json.

Parameters

-FilePath

Location of the newly exported custom variables. Should have .json extension.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-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.

Type: System.Windows.Forms.DialogResult[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-NoClobber

Prevents the cmdlet from overwriting existing files. If a file with the specified name already exists, the cmdlet will generate an error instead of overwriting the file.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-VariableScope

Which custom variables to export. Must be one of the following:

"DataSource", "Vault", "UserVault", "Option"

Type: Devolutions.PowerShell.Enums.CustomVariableScope
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 2
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

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.

Notes

For more information, type "Get-Help Export-RDMCustomVariable -detailed". For technical information, type "Get-Help Export-RDMCustomVariable -full".

Devolutions Forum logo Partagez vos commentaires