Set-RDMEntryAttachment

Synopsis

Save attachments

Syntax

__AllParameterSets

Set-RDMEntryAttachment [-InputObject] <PSConnectionAttachment[]> [-AllowExport <bool>]
 [-Description <string>] [-Password <securestring>] [-Title <string>] [-Refresh]
 [-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Save attachments. Only advanced data sources support attachment. The user must have the right to edit the attachments.

Examples

Example 1

PS C:\> Get-RDMEntry -Name EntryA | Get-RDMEntryAttachment | Set-RDMEntryAttachment -AllowExport $false

Prevent the export of all EntryA's attachments.

Example 2

PS C:\> $pwd = New-RDMRandomPassword -Mode Strong;
    $securepwd = ConvertTo-SecureString -String $pwd -AsPlainText;
    Get-RDMEntry -Name EntryA | Get-RDMEntryAttachment -Title 'AttachmentA' | Set-RDMEntryAttachment -Title 'Attachment A' -Description 'New description' -Password $securepwd

Change the title, description, and password of the attachment named AttachmentA of the entry EntryA

Parameters

-AllowExport

Allow or disallow the attachment to be exported.

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

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

-Description

Attachment description.

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

-InputObject

Attachments to save. Can be obtained from Get-RDMEntryAttachment.

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

-Password

Attachment password.

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

-Refresh

Refresh the entries in the vault. For modification in bulk, use Update-RDMEntries after the modifications instead of this switch.

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

-Title

Attachment title.

Type: System.String
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.PSConnectionAttachment

Array of PSConnectionAttachment to save. Can be obtained from Get-RDMEntryAttachment.

Notes

For more information, type "Get-Help Set-RDMEntryAttachment -detailed". For technical information, type "Get-Help Set-RDMEntryAttachment -full".

Devolutions Forum logo Donnez-nous vos commentaires