Import-RDMEntry

Synopsis

Import RDM sessions from a file

Syntax

__AllParameterSets

Import-RDMEntry [-Path] <string> [[-Group] <string>] [[-Password] <securestring>]
 [[-DuplicateAction] <string>] [-KeepID] [-Set] [-VaultMode <VaultMode>]
 [-ForcePromptAnswer <DialogResult[]>] [<CommonParameters>]

Description

Import RDM sessions from a file. The supported files are '.rdm' and '.json'. To save the attachments and documentation, the parameter Set must be used. The returned entries does not included them.

Examples

Example 1

PS C:\> $sessions = Import-RDMSession -Path "C:\MyFile.rdm" -Group "DestinationGroup" -DuplicateAction "Add"

Obtain all sessions in the file "MyFile.rdm" and prepend their group with DestinationGroup. In case a session already existed, a new ID will be assigned to it.

Example 2

PS C:\> $pwd = ConvertTo-SecureString "myPassword" -AsPlainText; $sessions = Import-RDMSession -Path "C:\MyFile.rdm" -Password $pwd | Set-RDMSession

Obtain all sessions in the password protected file "MyFile.rdm". In case a session already existed, it will be ignored. All sessions are saved in the current data source.

Parameters

-DuplicateAction

Action when a duplicate is found. Must be one of the following:

"Add", "Overwrite", "Ignore"

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 3
  IsRequired: false
  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: ''

-Group

The group where the sessions will be saved.

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

-KeepID

Keep the entries' ID. Unwanted behaviors, such as moving an entry if imported in the same database, might occurs if this option is present.

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

-Password

Password to access a password protected file.

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

-Path

Path where the file is loaded. Must be finish:

"RDM: .rdm", "XML: .xml", "JSON: .json"

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

-Set

Save all imported sessions. Required to import the documents and attachments included in sessions.

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

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

Type: Devolutions.RemoteDesktopManager.VaultMode
DefaultValue: ''
SupportsWildcards: false
Aliases: []
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.

Notes

For more information, type "Get-Help Import-RDMEntry -detailed". For technical information, type "Get-Help Import-RDMEntry -full".

Devolutions Forum logo Donnez-nous vos commentaires