Import-RDMSession

    2024-10-28

    Import-RDMSession

    SYNOPSIS

    Import RDM sessions from a file

    SYNTAX

    __AllParameterSets

    Import-RDMSession [-Path] <string> [[-Group] <string>] [[-Password] <securestring>]
     [[-DuplicateAction] <string>] [-KeepID] [-SetSession] [-ForcePromptAnswer <DialogResult[]>]
     [<CommonParameters>]
    

    ALIASES

    This cmdlet has the following aliases,

    DESCRIPTION

    Import RDM sessions from a file. To save the sessions in the data source, the parameter SetSession must be used. The supported files are '.rdm' and '.json'.

    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
    ParameterValue: []
    Aliases: []
    ParameterSets:
    - Name: (All)
      Position: 4
      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
    ParameterValue: []
    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
    ParameterValue: []
    Aliases: []
    ParameterSets:
    - Name: (All)
      Position: 2
      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
    ParameterValue: []
    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
    ParameterValue: []
    Aliases: []
    ParameterSets:
    - Name: (All)
      Position: 3
      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
    ParameterValue: []
    Aliases: []
    ParameterSets:
    - Name: (All)
      Position: 1
      IsRequired: true
      ValueFromPipeline: false
      ValueFromPipelineByPropertyName: false
      ValueFromRemainingArguments: false
    DontShow: false
    AcceptedValues: []
    HelpMessage: ''
    

    -SetSession

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

    Type: System.Management.Automation.SwitchParameter
    DefaultValue: ''
    SupportsWildcards: false
    ParameterValue: []
    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.

    INPUTS

    OUTPUTS

    RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection

    NOTES

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