Powershell Module broken after update
Well I ended up reinstalling to C:\. Works as expected now.
Powershell Module broken after update
You can use the PowerShellOverride to achieve that.
$override = Get-RDMPowerShellOverride
$override.OptionFilePath = "D:\Programs\RDM\RemoteDesktopManager.cfg"
Set-RDMPowerShellOverride
And then restart your PowerShell session.
Thank you, this does indeed override the path (confirmed with Get-RDMInstance).
Now, if I re-create the datasource (New-RDMDataSource as in the OP), it is immediately added (Get-RDMDatasource confirms this).
This is surprising to me, as I expected I have to run Set-RDMDatasource first).
Afterwards I can use Set-RDMCurrentDatasource to switch, and the connection is online!
This is not persistent, however. Opening a new Powershell session still shows the correct config path, but once again I only have the local datasource.
What do I need to do to save this information?
Powershell Module broken after update
Hi,
What version of the PowerShell module are you running? You can find out by executing Get-RDMInstance.
The latest version is 2021.2.0.18.
Also make sure the path to the option file shown matches the one RDM shows in Options -> Avanced (completely at the bottom, RDM will show the path to the RemoteDesktopManager.cfg it is using).
Regards
Ahh thank you, I feel like I have found the issue.
Get-RDMInstance returns a config file path that is incorrect - it points to "%localappdata%\Devolutions\RemoteDesktopManager\RemoteDesktopManager.cfg" which does not exist
However, according to RDM options (and my harddrive), the InstallDir is "D:\Programs\RDM". The "RemoteDesktopManager.cfg" file is also in that location.
How do I tell the Powershell module to use the correct config? There is no "Set-RDMInstance" command :(
Powershell Module broken after update
Hello,
I was out of office for a month and recently upgraded to 2021.2.16.0, which brought with it the new way of powershell handling.
I read the patch notes and installed the new module from PSGallery.
Since then, none of my attempts to communicate with RDM through powershell seem to work. First off, the module is not reading the settings from the application - not sure if this is intended.
Executing "Get-RDMDataSource" returned only a local one, and not the remote one defined in the application.
I tried creating it like this:
$ds = New-RDMDataSource -IntegratedSecurity -name RDM-SQL -SQLServer -Server sqlserver -SetDataSource -DataBase RDM-DB
(values lifted directly from the application)
This appears to work, it is listed in "Get-RDMDataSource". I then tried setting it as active:
Set-RDMCurrentDataSource $ds
However, the connection is never actually made to the database.
Get-RDMDataSource shows "IsConnected : False IsOffline : False", and I can't figure out how to change this.
Running something like "Get-RDMSession" in this state gives an error "Connection not found" (translated from german, original "Verbindung nicht gefunden").
I found a similar issue here, but no solution:
https://forum.devolutions.net/topics/35950/problem-with-changing-the-data-source
Close-RDMSession not working as expected
RDM Version 2020.3.24.0 64-Bit
I'm trying to use my standard shell in conjuction with RDMs log features.
So I start a new session "invisibly" like this:
$s = get-rdmsession -name foobar
open-rdmsession -id $s.id -Silent $TrueThis works, and I appear in RDM as "logged in" to the machine.
After closing my SSH connection, I attempt to close the RDM Session aswell:
close-rdmsession -id $s.id -forceHowever, this appears to have no effect - I can still see the session running in the "Opened Sessions" window, and I need to close it there manually.
The created session does also not appear if I run
Get-RDMOpenedSessionAm I doing something wrong? I currently need to mark the session as closed "by hand" in the "Opened Sessions" list.
Powershell - Invoke-RDMParentSession throws "Access Denied"
I managed to solve this problem on my own.
There is no need to run Set-RDMSession first, it is possible without it.
The problem was that I needed Admin rights on the datasource to be able to do it.
This also explains why the "Parent" option never showed up in my right-click menu.
You might want to inform your devs that Invoke-RDMParentSession is only possible with admin, but Invoke-UnparentRDMSession works without it (although it returns the same warning).
Powershell - Invoke-RDMParentSession throws "Access Denied"
Kinda funny, I just tried the opposite: create a subconnection manually and run "Invoke-RDMUnparentSession".
It also throws "WARNING: Access denied" but it works.
PS C:\Users\> Invoke-RDMUnparentSession $s.SubConnections -Refresh
WARNING: Access denied
Do you really want to un-parent the selected entries?
[Y] Yes [N] No (default 'N'):
y
PS C:\Users\>
Powershell - Invoke-RDMParentSession throws "Access Denied"
Hello,
I've tried your suggestion but I'm still getting "WARNING: Access Denied".
Set-RDMSession works, it creates a new session. How can this be a permission problem (as indicated by the warning) if I can do it through GUI?
Powershell - Invoke-RDMParentSession throws "Access Denied"
Hello all,
I'm trying to add a new subconnection to an existing session.
However, I keep getting "Access Denied", although I'm able to do this through the GUI (I have RW access to the datasource).
Even worse, the return code is "True" although nothing happens.
Minimal example:
PS C:\Windows\system32> Import-Module "${env:ProgramFiles(x86)}\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1"
PS C:\Windows\system32> $s = Get-RDMSession -Name server01
PS C:\Windows\system32> $new = New-RDMSession -Name Test -Type WebBrowser
PS C:\Windows\system32> $new.WebBrowserUrl = "https://example.com/"
PS C:\Windows\system32> Invoke-RDMParentSession -ParentSession $s -Session $new
WARNING: Access denied
PS C:\Windows\system32> echo $?
True
Dokumentation über Powershell setzen
Hallo,
ich versuche momentan mithilfe von Ansible installierte System über Powershell in den RDM einzupflegen.
Das klappt mit Hilfe von New-RDMSession schon ganz gut.
Jedoch konnte ich bisher keine Möglichkeit finden, die "Dokumentation" (Reiter neben Übersicht) über Powershell zu setzen bzw. zu lesen.
Ist dies über die Powershell-Module nicht möglich?
Liebe Grüße
Felix