PS /home/rdm> $tEntry = Get-RDMEntry -Name testentry
PS /home/rdm> Write-Host $tEntry.Name
testentry
PS /home/rdm> $deletedEntries = Remove-RDMEntry -InputObject $tEntry -Verbose
VERBOSE: [Remove-RDMEntry] Start
VERBOSE: [Remove-RDMEntry] testentry deleted.
VERBOSE: [Remove-RDMEntry] Deleted Entries: 1
VERBOSE: [Remove-RDMEntry] Finish
PS /home/rdm> Write-Host $deletedEntries.length
0
PS /home/rdm> $deletedPermEntries = Get-RDMDeletedEntry
PS /home/rdm> Write-Host $deletedPermEntries.Name
testentry
PS /home/rdm> Write-Host $deletedPermEntries.length
1
PS /home/rdm> $delEn = Remove-RDMDeletedEntry -InputObject $deletedPermEntries -Verbose
VERBOSE: [Remove-RDMDeletedEntry] Start
VERBOSE: Performing the operation "Remove-RDMDeletedEntry" on target "b362703d-6707-4398-8521-70ed40196960".
VERBOSE: [Remove-RDMDeletedEntry] The operation failed
VERBOSE: [Remove-RDMDeletedEntry] Finish
PS /home/rdm> Write-Host $delEn.length
0
PS /home/rdm>
BUT: get-help ...
Remove-RDMEntry
OUTPUTS
RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection[]All deleted entries, including those contained in a deleted folder and sub
entries.
Remove-RDMDeletedEntry
OUTPUTS
RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnectionHistory[]Array of PSConnectionHistory of the InputObject parameter
2023.2.0.9 Devolutions.PowerShellHello,
Thank you for contacting us regarding this matter.
You have to use the -PassThru parameter if you want the object to be displayed onscreen. By default, nothing will be displayed, but the PSConnection array is still available.
Best regards,
Richard Boisvert
Many thanks for the answer. What I mean is is it possible to get a return value from the actually deleted values? for example: > $deletedEntries = Get-RDMDeletedEntry after that $deletedEntries.length = 10 > $delEn = Remove-RDMDeletedEntry -InputObject $deletedEntries ... -Verbose VERBOSE: [Remove-RDMDeletedEntry] Start VERBOSE: Performing the operation "Remove-RDMDeletedEntry" on target "XXX01". VERBOSE: [Remove-RDMDeletedEntry] The operation failed : VERBOSE: Performing the operation "Remove-RDMDeletedEntry" on target "XXX02-10". VERBOSE: [Remove-RDMDeletedEntry] The operation successful : VERBOSE: [Remove-RDMDeletedEntry] Finish > Write-Host $delEn.length 9 And the same logic should work for Remove-RDMEntry too.
Hello,
In your example, you still have that value in your variable $deletedEntries; you can reference it from there. Could you please explain the use case for it?
Best regards,
Richard Boisvert