Forum / Remote Desktop Manager - Feature Request

automate 'load from inventory'

  • Create an Issue
  • Cancel

Is it possible to do a 'load from inventory' periodically and silently update all RDP entries, to get current IP addresses, etc?

Clock7 mths

Hello,

If you have the information's that you would like to sync periodically in a CSV file, it would be possible for you to use our CSV Synchronizer feature to sync your data inside RDM - https://help.remotedesktopmanager.com/synchronizer_csv.htm

Best regards,



Jeff Dagenais

signaturesignature

Clock7 mths

Hello,

Are you familiar with PowerShell?

If so, you can use the Invoke-RDMLoadFromInventorySession cmdlet to update the information.

Here is a sample script you could use to update the information on a regular basis. You must adapt the data source name (File - Data Sources) in the following script with the one you are using. Remote Desktop Manager must be installed on the machine where the script will run. Finally, the data source must exist in the user profile that will run this script periodically.

Import-Module 'C:\Program Files (x86)\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1'

$ds = Get-RDMDataSource -Name "NameOfYourDataSourceHere"
Set-RDMCurrentDataSource $ds

$sessions = Get-RDMSession | where {$_.ConnectionType -eq "RDPConfigured"}

foreach ($session in $sessions)
{
Invoke-RDMLoadFromInventorySession $session
Set-RDMSession $session -Refresh
}

Update-RDMUI

Best regards,



Érica Poirier

signaturesignature

Clock7 mths

You guys are great! Thanks Erica and Jeff for the helpful suggestions.

Clock7 mths

Any idea why I might be receiving the following error whenever running this as an embedded powershell script:


Get-RDMSession : Connection not found.
At C:\Users\user\AppData\Local\Temp\RDM\eeb99569-5f04-42eb-a6f9-3ebb2d998123.ps1:6 char:13
+ $sessions = Get-RDMSession | where {$_.ConnectionType -eq "RDPConfigu ...
+ ~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (smile [Get-RDMSession], Exception
+ FullyQualifiedErrorId : 0,RemoteDesktopManager.PowerShellModule.GetRDMSessionCommand

Clock3 mths

Hello,

Have you enabled the Load RDM CmdLet option in the PowerShell entry's properties?


2019+05+17+7+52+03

If so, the first 3 lines of the provided script above are not required as the module will be already loaded and the script already run on the right data source.


Best regards,



Érica Poirier

signaturesignature

2019-05-17_7-52-03.png
Clock3 mths

I had it enabled, so I removed the first 3 lines of the script. I then received this error:
image

By the way, in the UI that I see, the options in your screenshot above are separated over a 'general' and 'advanced' tab. Looks like it's all on one page in yours. Is that a new build?

image

Clock3 mths

Nvm on the second part of that question. I see you were using a different entry. I tried it with that as well, but resulted in the same error.

Clock3 mths

Hello,

What RDM version are you using?

What data source type are you connected to?

Could you please open PowerShell in the Tools menu and run the following commands?

Get-RDMCurrentDataSource
Get-RDMCurrentRepository

Do you get the current data source and current repository or an error?

If you do not get any error, can you get the sessions list with Get-RDMSession?

Best regards,



Érica Poirier

signaturesignature

Clock3 mths

I am using 2019.1.20.0 and am connected to a Devolutions Online Drive data source.

For the first command, I get the current data source.

For the second command, I get the following message:
WARNING: Command available with an advanced data source only.

With Get-RDMSession, I am able to see all entries in the data source.

Clock3 mths

Hello,

Have you replaced the name of the data source in the script with the one you have set in File - Data Sources?

image

This line in the script, you must put the right data source name.

$ds = Get-RDMDataSource -Name "NameOfYourDataSourceHere"

Best regards,



Érica Poirier

signaturesignature

Clock2 mths