Remove-RDMEntry

Synopsis

Delete existing entries.

Syntax

Id

Remove-RDMEntry [-ID] <guid[]> [-PassThru] [-Refresh] [-VaultMode <VaultMode>]
 [-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

InputObject

Remove-RDMEntry [-InputObject] <PSConnection[]> [-PassThru] [-Refresh] [-VaultMode <VaultMode>]
 [-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Delete existing entries. If an entry is a folder, all entries it contains are also deleted. For each entry, the user must have the delete permission. Use the VaultMode parameter to specify the user vault ou global vault if required.

Examples

Example 1

PS C:\> Get-RDMEntry -Name Entry* | Remove-RDMEntry

Delete all entries whose name starts with Entry in the current vault.

Example 2

PS C:\> Get-RDMEntry -Name Entry* -VaultMode User | Remove-RDMEntry -VaultMode User -Confirm

Delete all entries whose name starts with Entry in the user vault. The user will be prompted before each entry.

Example 3

PS C:\> $deletedEntries = Remove-RDMEntry -ID $folderID, $entryID -VaultMode Global -PassThru

Delete the entries specified by the ids stored in $folderID and $entryID in the system vault. All deleted entries, including the entries contained in the folder specified by $folderID, are stored in $deletedEntries.

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

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

-ID

IDs of the entries be deleted.

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

-InputObject

Specifies the entries to delete.

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

-PassThru

Return all deleted entries, including entries in a deleted folder.

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

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

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

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

Entries to delete obtained from Get-RDMEntry for a specfic vault mode.

Notes

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

Devolutions Forum logo Donnez-nous vos commentaires