To support RDM Powershell script running as a service, Open-RDMSession should provide return values
Since customers are writing solutions using Powershell, Devolutions will need to start commutating when you make BREAKING changes to commandlets during upgrades.
Get-RDMDatasource return objects now have a .Name property instead of the prior .DisplayName
Open-RDMSession -id xxx - -silent stopped working. I changed to Open-RDMSyncSession, droped the silent property and it worked.
Thanks, Stu
To support RDM Powershell script running as a service, Open-RDMSession should provide return values
Olivier,
I worked through my issues. I didn't catch that the command change from open-RDMSession to Open-RDMSyncSession.
Can you provide details on the PSSyncResult object? $result.Success is now returing true. But $result.Connections and $result.log are null
BTW/ what IDE do you use for writing and debugging your Powershell work? PowerGui is dead and the MS Powershell IDE has clumsy debugging.
Thanks, Stu
To support RDM Powershell script running as a service, Open-RDMSession should provide return values
The Powershell module loads correctly from within RDM tools menu. Get-RDMDatasource spews component names from after the import-module. As I mentioned it's dated 2016.
To support RDM Powershell script running as a service, Open-RDMSession should provide return values
Tomorrow I need to do some debugging.
This morning my server side scripts that run under Task Scheduler to sync RDM data sources failed after working for months. I think a user updated their RDM client and updated the sql data source schema without me knowing So I updated my server side client driven by powershell and am trying to get it to update via open open-rdmsyncsession.
I currently use Import-Module "C:\Program Files (x86)\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1"
BTW/ the RemoteDesktopManager.PowerShellModule.psd1 file is still dated 10-13-2016?
My script has been calling it for months that way by importing the module. In this thread you indcated that in the next major build open-rdmsyncsession would now return results?
Have any PowerShell commands changed required properties with this new build?
Also, my script called RDM powershell commands using the inherited authenticated user. Does this need to change.
Right now not even my first $RDM_DS = Get-RDMDataSource command works.
To support RDM Powershell script running as a service, Open-RDMSession should provide return values
I just upgraded to the latest RDM 12.5.2.0 and my powershell script does not update. Looks like the synchronizer does not work. Is this updated command documented?
In fact I think my first RDM command "Get-Datasource" is no longer working? Do we need a flag to tell it now to use integrated authentication?
Thanks, Stu
CSV Synchronizer ignores updated values to the Group\Folder value
Excellent. Thanks very much!
CSV Synchronizer ignores updated values to the Group\Folder value
Similar to https://forum.devolutions.net/messages.aspx?TopicID=26012
My issue is that the CSV synchronizer will not update the Group \ Folder after initial synchronization. I pull all of our servers from a management system and then parse the server name by naming convention to set the Group\Folder value. Sometimes a deployed server will not match naming conventions and I assign it to the Miscellaneous group\folder in RDM. Later I go back and add a name override to my name parsing routine which will now assign the correct folder\group. The CSV Synchronizer ignores the change of Folder\Group and I must manually delete the object from the RDM SQL datasource for it to show up in the correct Group\Folder the next scheduled synchronization.
Please consider this fix also.
Synchronizer ignores Description Updates
My issue is that the CSV synchronizer will not update the Group \ Folder after initial synchronization. I pull all of our servers from a management system and then parse the server name by naming convention to set the Group\Folder value. Sometimes a deployed server will not match naming conventions and I assign it to the Miscellaneous group\folder in RDM. Later I go back and add a name override to my name parsing routine which will now assign the correct folder\group. The CSV Synchronizer ignores the change of Folder\Group and I must manually delete the object from the RDM SQL datasource for it to show up in the correct Group\Folder the next scheduled synchronization.
Please consider this fix also.
Thanks, Stu
To support RDM Powershell script running as a service, Open-RDMSession should provide return values
This is great!
Thank you very much. Stu
To support RDM Powershell script running as a service, Open-RDMSession should provide return values
That would be great.
To support RDM Powershell script running as a service, Open-RDMSession should provide return values
I know that Open-RDMSession can be used for many type of actions. I my case I am opening a Synchronizer object by guid to execute it.
I'd like to know the result of the execution of the named synchronizer.
By successful execution, do you mean when you open the connection and tried to start the sync or once the sync is done without errors?
I'd like to know as much as possible.
Did the Synchronizer run without errors? (Best case)
Did I successfully start the synchronizer? (worst case)
-Stu
To support RDM Powershell script running as a service, Open-RDMSession should provide return values
I have a script that is run with a service account and an ELEVATED PowerShell session from Task Scheduler. The script body imports the RDM module.
I have logged on to the server as the service account and configured RDM - so it has a profile.
Thanks, Stu
To support RDM Powershell script running as a service, Open-RDMSession should provide return values
I have a script that forces RDM synchronization with a CSV using the Synchronizer object.
It runs silently using this command: Open-RDMSession -ID $SyncTempGuid -Silent
I am not sure whether RDM is sucesfully executed every time.
Could Open-RDMSession by updated to provide a return value to check for a successful execution ?
-Stu
Methods to run RDM Synchronizer via Powershell appear to require interact with Desktop
Only have one config file:
C:\>dir RemoteDesktopManager.cfg /s
Volume in drive C has no label.
Volume Serial Number is F250-5AE7
Directory of C:\Users\sschifter\AppData\Roaming\Devolutions\RemoteDesktopManage
r
01/18/2017 09:13 AM 7,692 RemoteDesktopManager.cfg
1 File(s) 7,692 bytes
Total Files Listed:
1 File(s) 7,692 bytes
0 Dir(s) 21,353,816,064 bytes free
C:\>
Methods to run RDM Synchronizer via Powershell appear to require interact with Desktop
Still getting this error when running the script externally in PS.
I am running RDM 12.0.8 Enterprise Edition Trial.
Get-RDMDataSource is failing with:
Get-RDMDataSource : The PowerShell CmdLet feature is only available in the Enterprise Edition!
At C:\EdgeTG Scripts\RDMSync-EdgeTGCustForests.ps1:66 char:11
+ $RDM_DS = Get-RDMDataSource
Methods to run RDM Synchronizer via Powershell appear to require interact with Desktop
I had to open a duplicate Powershell session with Administrative permissions. Open-RDMsession appeared to work.
Methods to run RDM Synchronizer via Powershell appear to require interact with Desktop
I am running RDM 12.0.8 Enterprise Edition Trial.
Get-RDMDataSource is failing with:
Get-RDMDataSource : The PowerShell CmdLet feature is only available in the Enterprise Edition!
At C:\EdgeTG Scripts\RDMSync-EdgeTGCustForests.ps1:66 char:11
+ $RDM_DS = Get-RDMDataSource
+
Methods to run RDM Synchronizer via Powershell appear to require interact with Desktop
Loaded the new module and debugging the breakage.
Methods to run RDM Synchronizer via Powershell appear to require interact with Desktop
So you are saying the method of initializing RDM Powershell will determine the PowerShell features?
I guess I need an example for the updated RDM powershell on how to load RDM into an powershell session?
Methods to run RDM Synchronizer via Powershell appear to require interact with Desktop
Yes, loading it differently as per earlier examples:
$RDMPath = "C:\Program Files (x86)\Devolutions\Remote Desktop Manager"
$RDMVersion = "12.0.8"
#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 }
-Stu
Looking for PS example of executing without any RDM UI?
We can close this. I have another thread going for Open-RDMSession not taking the -Silent switch
See: Update topic - Methods to run RDM Synchronizer via Powershell appear to require interact with Desktop - Olivier Désalliers
-Stu
Methods to run RDM Synchronizer via Powershell appear to require interact with Desktop
Updated to 12.0.8.0 RDM
Open-RDMSession -ID $SyncTempGuid -Silent
.
The above PS Open-RDMSession command throws error:
Open-RDMSession : A parameter cannot be found that matches parameter name 'Silent'.
At C:\EdgeTG Scripts\RDMSync-EdgeTGCustForests.ps1:149 char:36
+ Open-RDMSession -ID $SyncTempGuid -Silent
+ ~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Open-RDMSession], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Devolutions.RemoteDesktopManager.Business.PS.Commands.OpenRDMSess
ionCommand
Looking for PS example of executing without any RDM UI?
Supposedly the new RDM 12 client and PowerShell will support unattended execution of RDM scripts without a UI? Looking for an example of this to be able to update my RDM client scripts.
Methods to run RDM Synchronizer via Powershell appear to require interact with Desktop
Thanks. I'm excited!
Methods to run RDM Synchronizer via Powershell appear to require interact with Desktop
Olivier, any update on this?