Forum / Remote Desktop Manager - PowerShell Repository

Powershell script to run Sync Sessions on Scheduled Task

  • Create an Issue
  • Cancel

I'm trying to write a PS script to run my RDM Sync Importers as a scheduled task. My code this below (String vars removed).
When I call the Open-RDMSyncSession, I get an error "Warning: Connection not found"

Import-Module 'C:\Program Files (x86)\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1'
$SecureString = ConvertTo-SecureString -String $securepassword

Set-RDMCurrentDataSource -ID $DataSourceID -Username $username -Password $SecureString
Open-RDMSyncSession -ID $syncsessionid

Clock3 yrs

Hello,


I have been able to reproduce your issue only when the user that is connected to the data source doesn't have access to the Sync session in the data source.

Could you please check if the user connected to the data source has access to the Sync entry in RDM?


Best regards,



Érica Poirier

signaturesignature

Clock3 yrs

Thanks for the quick Reply Erica; you were right. My Issue was I wasn't specifying the username as "ADNETBIOS\username" so it didn't have access to it. once I added my AD Domain to the username it worked. (I guess this is reasonable behavior, but contrary to how the AD GUI works where I can just type in my username and it'll search)

-Chris

Clock3 yrs