Forum / Remote Desktop Manager - PowerShell Repository

Update from Scheduled Task

  • Create an Issue
  • Cancel

Hello

I'm trying to create/update sessions from a scheduled task.

I've logged in as the user who will run the scheduled task and configured RDM. I've added the following to the top of my script:


$RDMPath = "C:\Program Files (x86)\Devolutions\Remote Desktop Manager"$RDMVersion = "11.1.0"set-alias installutil "$([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())installutil.exe"installutil "$RDMPath\RemoteDesktopManager.PowerShell.dll"if ( (Get-PSSnapin -Name Remote.Desktop.Manager.$RDMVersion -ErrorAction SilentlyContinue) -eq $null ) { Add-PsSnapin Remote.Desktop.Manager.$RDMVersion }

When i run this script as the user, it runs fine and creates/updates sessions. But when i run it as a task, it just times out.

Any ideas?

Clock4 yrs

Hello,

What user account is used to run the task?



Maurice Côté

signaturesignature

Clock4 yrs

A domain user called "__Scheduled_Task". This user is also created as a "Administrator" in RDM

Clock4 yrs

the config of RDM is stored by default in the %LOCALAPPDATA% folder, this means that it's unique to each account.

Solutions are either to log in with that account and configure RDM, or to use an override to point to a common path. This is like our "portable" deployment method.

Please consult http://help.remotedesktopmanager.com/installation_portableusb.htm and http://help.remotedesktopmanager.com/installation_configurationfilelocation.htm


Best regards,



Maurice Côté

signaturesignature

Clock4 yrs

That seemed to do the trick, thanks!

Clock4 yrs