Hi,
I checked out the sample codes on Github to create a new credential entry but can't get it to work.
My code:
$ds = Get-RDMDataSource -Name $rdm_datasource_name Set-RDMCurrentDataSource $ds #create credential $creds = New-RDMSession -Name $entry_name -Type Credential -Group $folder $creds.Credentials.UserName = $cred_username Set-RDMSession $creds -Refresh Set-RDMSessionPassword -ID $creds.ID -Password (ConvertTo-SecureString $password -AsPlainText -Force)
My Error:
In previous posts this code seemed to work for other users.
RDM Version: 2022.1.27.0
Any Idea what I am doing wrong?
Thank you in advance
Hello,
What version of the Powershell Module are you using? (have you installed it like mentioned here : https://kb.devolutions.net/kb_rdmpowershellcore.html)
What type of data source are you on?
Thanks for letting me know
Best regards,
Alex Belisle
Thank you for your quick reply.
Okay seems like I had to read further my bad. I registered the module now it looks better but I ran into another issue.
We are using an advanced data source like MS SQL now I get this when executing the script:
I should be connected though:
Im connecting to the data source using this cmdlet:
New-RDMDataSource -Database $rdm_db_name -Name $rdm_datasource_name -Server $rdm_db_server -IntegratedSecurity -SQLServer -SetDatasource
I'm guessing my current logged in user does not have sufficient permissions to access the DB.
How do I provide credentials?
Hello,
If your data source supports SQL-Logins (or Custom accounts(Devolutions)), you simply have to add the -Username parameter to your cmd let:
New-RDMDataSource -Database $rdm_db_name -Name $rdm_datasource_name -Server $rdm_db_server -SQLServer -username <username> -password <password> -SetDatasource
If you have RDM installed, by default the Powershell Module should use the same configuration, just make sure you close RDM (to save that configuration file properly) then you can run
Update-RDMUI from powershell, you should now access the new configurations.
Technically, if you're an administrator you should have all the permissions on your data source
Let me know if this helps.
Best regards,
Alex Belisle