Hello,
For some scripting related work I would like to connect to RDM with a powershell session.
In the past this was done by importing the module from the application directory but I saw that the module was now available in the repository.
With the command "Install-Module -Name RemoteDesktopManager -RequiredVersion 2021.2.0.14" I installed the module.
To set the currentdatasource I first entered "Get-RDMDatasource", then I copy the ID and enter the "Set-RDMCurrentDatasource *ID*" cmdlet.
Then I want to issue a 'Get-RDMVault' but Powershell keeps giving me the error "WARNING: Your connection is not ready".
Even when I use Update-RDMUI is still cannot connect.
Do you know how to solve this?
RDMPowershell Issue.png
Hi,
With the move to PowerShell 7.x and dotnet core, we unfortunately lost some UI features.
One of them is DVLS embedded web authentication.
To counter that, we added credentials for scripting purpose that can be used along side the credentials used by RDM.
If your RDM version is up to date, you can find a Scripting tab in your DVLS data source settings where you can enter the DVLS application ID and password.
Otherwise, you can enter this information from a PowerShell terminal like so
$ds = Get-RDMDataSource -Name "x-DPS-MS" Set-RDMDatasourceProperty $ds -Property "ScriptingTenantID" -Value "tenantidhere" Set-RDMDatasourceProperty $ds -Property "ScriptingApplicationPassword" -Value "password" Set-RDMDataSource $ds Set-RDMCurrentDataSource $ds
The application ID and password can be created from the DVLS web interface, in the Administration -> Application section.
Regards
Jonathan Lafontaine
Hello Jonathan,
Thank you for the quick response.
In the web ui I have created the application and named it Powershell.
In both the RDM Client as well as directly in the Powershell Terminal I've tested the Application authorization methods.
Unfortunately both did not seem to work.
I have attached another screenshot for your reference.
Let me know what you can find.
Regards,
Tim
a9bd195a-bfbf-444c-8dad-08e6e1312f6a.png
RDMPowershell Issue2.png
Quick Update: I set the vault access for the script to some vaults and now I am able to use 'Get-RDMVault' cmdlet.
Is there a way to select all the vaults since we have so many? :)
Hi Tim,
Could you run these 2 commands please?
Get-RDMInstance Get-RDMCurrentDataSource
Jonathan Lafontaine
Oh, good news.
I don't think so based on my experience.
I will however pass the suggestion to the DVLS team and update this post if there is a way after all.
Regards
Jonathan Lafontaine
Haha I managed to tab+space around 300 times to select every vault.
Fortunately all vaults are visible now, thanks!
Since we often add a new vault I need to set myself a reminder to also tick the checkbox in the Application to allow access for scripting.
Regards,
Tim