Export-RDMTemplate

Synopsis

Export entry templates in a rdm file

Syntax

__AllParameterSets

Export-RDMTemplate [-InputObject] <PSTemplate[]> [-Filename] <string> [-NoClobber]
 [-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Export entry templates in a rdm file. The templates must be obtained from Get-RDMTemplate. By default, the cmdlet overwrites an existing file. To avoid this, use the NoClobber parameter.

The user must have the rights to manage the templates.

Examples

Example 1

PS C:\> Get-RDMTemplate -Type Local -NoEnumerate | Export-RDMTemplate -Filename 'C:\my\path\localTemplatesExported.rdm' -NoClobber

Export all local entry templates in the file 'C:\my\path\localTemplatesExported.rdm'. The operation will fail if the file already exists.

Example 2

PS C:\> $templates = Get-RDMTemplate -Type Shared
PS C:\> foreach ($template in $templates) {
             $templateName = $template.Name
             Export-RDMTemplate -InputObject $template -Filename "C:\dev\Test\Test\$templateName.rdm"
        }

Export all shared entry templates in individual files

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-Filename

Export file name. It can include the path. The extension must be '.rdm'.

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 not an option No.

  • Cancel: Cancel the yes/no/cancel prompt. No is the fallback option if there is not an option Cancel.

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: ''

-InputObject

The templates to export.

Type: RemoteDesktopManager.PowerShellModule.PSOutputObject.PSTemplate[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-NoClobber

NoClobber prevents an existing file from being overwritten and displays a message that the file already exists. By default, if a file exists in the specified path, it is overwritten.

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: ''

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  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.

Inputs

RemoteDesktopManager.PowerShellModule.PSOutputObject.PSTemplate

Entry templates obtained from Get-RDMTemplate to export

Notes

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

Devolutions Forum logo Give us Feedback