Unable to save RDMSession entries using Set-RDMSession powershell commands - getting access denied erorrs
While logged in I can manually create the credential entry however when trying to use the Powershell command: Set-RDMSession it fails and throws a warning: "WARNING: Unable to save the entry; access denied" I'm using the latest version of Remote Desktop Manager Enterprise edition (2021.2.27.0 64-BIT) and using Powershell version 5.1. This used to work just fine where before I used to have to import the Remotedesktop Powershell module each time however now continuously fails saying access denied.
Commands such as get-rdmcurrentdatasource pulls up just fine. As well as commands such as get-rdmsession I can pull up specific credentials via powershell as well.
Hi,
This error message is displayed when PowerShell determined your don't have the rights to Add to a data source.
Could you paste the command you used to get the entry?
Regards
Jonathan Lafontaine
$isrdm = (get-rdmdatasource | Where-Object {$_.name -eq 'is-rdm'}).id
$isrdm1 = $isrdm | select -ExpandProperty guid
Set-RDMCurrentDataSource -ID $isrdm1
$thegroup = "_Root\HST\Certificates"
$session = New-RDMSession -Group $thegroup -Type credential -Name $computerName; # this sets the session up which I'll be creating and using the set-rdmsession command below
Set-RDMSession -Session $session -Refresh; #(This part fails with the access denied error) (Normally this used to prompt me to login with my ID at RDM but doesn't seem to do that anymore. Still I'm able to query different RDM sessions without errors though.)
Update-RDMUI;
Any update on this?
I haven't been able to reproduce this issue yet.
If you are comfortable with the idea, I could send you a build with added verbosity around the area I think is problematic to help diagnose the issue.
Jonathan Lafontaine
I'm thinking the process has perhaps changed for how I should be logging in or maybe connecting to RDM. What are the current steps for creating a new credential entry within RDM using Powershell that you are following?
It will depend on the type of credential you are trying to create.
A simple Username/Password entry can be created like this
$entry = New-RDMSession -Type Credential -Name "cred1" Set-RDMSessionUsername $entry -UserName "username" Set-RDMSessionPassword $entry -Password (ConvertTo-SecureString "ASecurePassword" -AsPlainText -Force) Set-RDMSession $entry -Refresh
A PasswordList is a bit more involving
$ps = New-RDMSession -Name "cred2" -Type Credential $ps.Credentials.CredentialType = "PasswordList" $psEntry = New-Object "RemoteDesktopManager.PowerShellModule.PsOutputObject.PSPasswordListItem" $psEntry.User = "User1" $psEntry.Password = (ConvertTo-SecureString "ASecurePassword" -AsPlainText -Force) $psEntry.Description = "Meaningful Description" $ps.Credentials.PasswordList += $psEntry Set-RDMSession $ps -Refresh
Jonathan Lafontaine