Users

All Posts (32)

avatar

steven09

Developer License: what needs to be done if hosting on docker behind proxy server

avatar
avatar
avatar
avatar

Thanks for the answers @mjs461 !

I understand the intention en mechanism better now.

Developer License: what needs to be done if hosting on docker behind proxy server

avatar
avatar
avatar
avatar

I suppose I need to move on now due to lack of response. I have no clue how to proceed.

@Adam Driscoll is there anything I missed? If I need support I am currently not aware how to get that and uncertain if I am even eligible for support. Not even sure if you even see these messages.

Developer License: what needs to be done if hosting on docker behind proxy server

avatar
avatar
avatar
avatar

Without wanting to sound passive aggressive (but I guess it still counts as that):

I guess there is no help for me on this one

Developer License: what needs to be done if hosting on docker behind proxy server

avatar
avatar
avatar
avatar

@Adam Driscoll any idea on this?

Developer License: what needs to be done if hosting on docker behind proxy server

avatar
avatar
avatar
avatar

Yesterday I wanted to apply for the developers license but I am kinda stuck at what to do to get that process to work.

Just some background info that might help or make a difference:

  • I’m running PSU on Docker behind a reverse proxy (Godoxy)

  • No ports are exposed as the reverse proxy routes traffic to PSU in the container on port 5000

  • The only entrance via the reverse proxy is port 443

  • I was previously running PSU with ironmansoftware/universal:latest

  • I switched yesterday evening to devolutions/powershell-universal:latest

  • Version now shows : 2026.1.6

  • The reverse proxy protects PSU access by having Authentik involved as OIDC (configured in the reverse proxy settings, not PSU)

I looked at the documentation on licensing:

https://docs.powershelluniversal.com/licensing#static-login-port

In that document it states I need to set this:

{
“PSULoginPort”: 60370
}

To be honest, I have no clue where to set this and the documentation does not seem to mention this either.

And then there is the fact I cannot reach that port anyway, there are layers of security around the setup of docker and containers that prevent opening ports to the public. The DNS does have anything regarding that port, the reverse proxy know nothing about that port, the docker compose has no port exposure, the container access is protected by OIDC via the reverse proxy so you need to authenticate before you can reach PSU on my docker env, that sort of thing.

And then there is the fact that I have no clue why I would need to open that port anyway, it feels like a bit of overreach to ask people to expose a port to the internet and bypass all protective layers. And is there any documentation or statement from PSU/Devolutions on what will be sent back and forth? Can I close that port once the developer license is pulled in the PSU environment?

So if I click the button “Login with Devolutions Account” I get this message in my browser:

Firefox can’t connect to the server at 127.0.0.1:60370

So the question now is: what do I need to do to get that developers license? Is there a way to just login to the Devolutions website with my account (which I have) and generate/get a license that I can apply to PSU myself? That would be infinitely easier and more secure than opening port(s) or having some back-and-forth between my PSU container and some server from Devolutions. This process ‘feels’ a bit more complex then it should be, but that could be for a reason I am not aware of.

Now I am assuming a lot here, about opening ports, listening servers and whatnot but that is because I have no clue what is needed and what will happen in the background once I (if indeed needed of course) open an unprotected port to the internet.

Some clarity on the correct needed setup, the routes of traffic involved so I can understand what would be needed and what the impact is.

In my case the involved parts are: DNS, Docker (compose), reverse proxy and Authentik

Any help on this would be appreciated!

PS: once I started using the image from devolutions/powershell-universal:latest I see a lot of messages like this in the logs of PSU:

[10:48:06 INF] Microsoft.AspNetCore.Hosting.Diagnostics Request starting HTTP/1.1 HEAD http://172.18.0.22:5000/ - null null                                                                                       │
│   [10:48:06 INF] Microsoft.AspNetCore.Mvc.ChallengeResult Executing ChallengeResult with authentication schemes (
).                                                                                               │
│   [10:48:06 INF] Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler AuthenticationScheme: Cookies was challenged.                                                                              │
│   [10:48:06 INF] Microsoft.AspNetCore.Hosting.Diagnostics Request finished HTTP/1.1 HEAD http://172.18.0.22:5000/ - 302 null null 32.821ms                                                                          │
│   [10:48:11 INF] Microsoft.AspNetCore.Hosting.Diagnostics Request starting HTTP/1.1 HEAD http://172.18.0.22:5000/ - null null                                                                                       │
│   [10:48:11 INF] Microsoft.AspNetCore.Mvc.ChallengeResult Executing ChallengeResult with authentication schemes (

Is this to be expected? Perhaps it is meant to be, no idea here.

Pagination through large data set with New-UDDataGrid

avatar
avatar
avatar

Thanks. I thought this was going to be the case. Well, off I go and dive into SQL once more

Pagination through large data set with New-UDDataGrid

avatar
avatar
avatar
Product: PowerShell Universal
Version: 2026.1.5

I have a large MySql data set of about 17000 records. As you can imagine, this is not a quick query, especially as the query has 2 columns where a stored function/procedure is called on them. That function is called clean_html

The process to cleanup this data on the DB itself is something that will happen in the future but not yet, so I have to clean the text fields like this.

I am using New-UDDataGrid to display this data.

It also feels like when I press the ‘go to next page’ button this whole LoadRows is executed again?

Roughly it looks like this:

New-UDDataGrid -LoadRows {

  $Cred = New-Object System.Management.Automation.PSCredential ($MySql_User,(ConvertTo-SecureString $Secret:MySql_Password -AsPlainText -Force))

  $Database = 'dbname'

  $Conn = [guid]::NewGuid().ToString()

  Open-MySqlConnection -ConnectionName $Conn -Server $MySql_Host -Database $Database -Credential $Cred -Port $MySql_Port

  $Sql = "SELECT id, title, `
                clean_html(introtext) as introtext_clean, `
                clean_html(``fulltext``) as fulltext_clean `
                from dbname.tablename `
                order by title"

  $Data = Invoke-SqlQuery -ConnectionName $Conn -Query $Sql -Stream

  Close-SqlConnection -ConnectionName $Conn
  Out-UDDataGridData -Data $Data -Context $EventData -TotalRows $Data.Length

} -Columns @(
        New-UDDataGridColumn -Field id
        New-UDDataGridColumn -Field title -Flex 5
        New-UDDataGridColumn -Field introtext_clean -Flex 10
        New-UDDataGridColumn -Field fulltext_clean -Flex 15

) -AutoHeight $true -Pagination -HeaderFilters -PageSize 10 -Density 'Compact'

As you can see, the complete data set is retrieved from the table. This takes to long and it feels inefficient to do this.

The question is: is there a better way to go through this data?

How to use PostgreSQL inside a script or page

avatar
avatar
avatar
Product: PowerShell Universal
Version: 5.6.13

I’m trying to use PostgreSQL as a data source for my script in Universal via Npgsql.

The data resides on another server then the one where PSU is running on.

I run PSU inside a docker container.

Looking at this page:

Ironman Software Support

I see that PSU v5 should run on .NET 8.

However, looking at this page:

docs.powershelluniversal.com

I see that v5 uses .NET 9

I could not get Install-Package to run inside the container so I copied the DLL files to the container itself:

/root/packages/Microsoft.Extensions.Logging.Abstractions.10.0.2

/root/packages/Npgsql.10.0.1

PS: the issue I got when I tried to install the packages:

Install-Package: Package ‘Npgsql’ failed to be installed because: End of Central Directory record could not be found.

The when trying to load the the types/DLL’s like this:

Add-Type -Path “/root/packages/Microsoft.Extensions.Logging.Abstractions.10.0.2/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll”

Add-Type -Path “/root/packages/Npgsql.10.0.1/lib/net8.0/Npgsql.dll”

I get these errors:

Could not load file or assembly '/root/packages/Microsoft.Extensions.Logging.Abstractions.10.0.2/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)

Could not load file or assembly '/root/packages/Npgsql.10.0.1/lib/net8.0/Npgsql.dll'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)

PS: I did try to load the .NET 9 versions of these files as well, same issues.

When I set the Execution Environment to “Powershell 7” I only see the error for “Microsoft.Extensions.Logging.Abstractions.10.0.2”

When I use the default “Integrated” environment I get messages for both DLL’s

I did go into the container and started a Powershell session, load the DLL’s and started querying the DB. It worked fine. I could load the .NET 8 versions of these DLL’s and got no complaints at any moment.

My questions are these:

  • How do I properly install all packages in PSU in order to use Npgsql?

How can I have PSU load these automatically when PSU starts?

  • The idea being that this should be available by default as multiple locations (scripts, pages, dashboards) should and will use PostgreSQL data and having these packages readily available in any script would be nice

What is the best or recommended way to (re)use connections?

  • Do I create a new connection in every script or is there some clever way to ‘share’ connections, and should I even want that?

Cheers!

Steven

Unrecognized calls to PHP and .env in the logs of Universal

avatar
avatar
avatar
avatar

Thanks for the detailed response!

If your Nginx setup is allowing any IP address to proxy into the PSU server from the internet then this sort of scan is only a matter of time typically.

My Nginx setup does not restrict access to the Universal instance, there is no filtering on IP address or something like that. It’s a simple sub.domain.com catch and all traffic is routed to Universal. Inside Universal the path (/appname1 or /appname2 etc.) decides which app (or Rest API) is executed.

I could add IP filtering as a short-stop for the current concerns but I think I need a little bit more robustness in the long run.

Luckily, that traffic gets routed to a docker container running Universal so if someone has access then only to whatever the Universal container has, not the host.

I’m not super worried as this setup is more for personal hobby projects that have little to no value, so there’s “safety through stagnation” at the very least I would say

Anyway, I have been thinking about adding MFA/OTP on top of Nginx to make all hosts routed through it safe(r).

Again, thanks for the insights, it helps!

Unrecognized calls to PHP and .env in the logs of Universal

avatar
avatar
avatar
avatar

Hi Adam,

yes it is public facing. I have a couple of DNS records pointing to my IP address and in Nginx I route traffic to the concerning docker container .

For Universal I have 1 separate DNS record and the / route points to an App or API. I always liked having access to the Apps on my mobile (some calculators related to bread baking and stuff like that) but I’m starting to think if that is wise or not…

I probably should look into Authelia or something like that, if I continue to have public facing Apps and/or API’s

But aside from that, you do not recognize this traffic?

If this needs to be locked down, what would you recommendation be, if I may be so bold to ask

Unrecognized calls to PHP and .env in the logs of Universal

avatar
avatar
avatar
avatar

Hi,

I was working on a Rest API and watched the logs when I found something I do not recognize. Perhaps it is OK, perhaps I have an … issue

I changed the subdomain and domain name as I am not 100% it is wise to share while I doubt these calls in my logs.

So sub.domain.com is a fake site address.

UniversalAutomation.GroomService Groom date is: 1/21/2025 6:45:02 PM
UniversalAutomation.GroomService Finished groom job.
Microsoft.AspNetCore.Hosting.Diagnostics Request starting HTTP/1.1 GET http://sub.domain.com/xampp/phpinfo.php - null null
Microsoft.AspNetCore.Hosting.Diagnostics Request finished HTTP/1.1 GET https://sub.domain.com/xampp/phpinfo.php - 404 0 null 13.244ms
Microsoft.AspNetCore.Hosting.Diagnostics Request reached the end of the middleware pipeline without being handled by application code. Request path: GET https://sub.domain.com/xampp/phpinfo.php, Response status code: 404
Microsoft.AspNetCore.Hosting.Diagnostics Request starting HTTP/1.1 GET http://sub.domain.com/lara/info.php - null null
Microsoft.AspNetCore.Hosting.Diagnostics Request finished HTTP/1.1 GET https://sub.domain.com/lara/info.php - 404 0 null 22.7197ms
Microsoft.AspNetCore.Hosting.Diagnostics Request reached the end of the middleware pipeline without being handled by application code. Request path: GET https://sub.domain.com/lara/info.php, Response status code: 404
Microsoft.AspNetCore.Hosting.Diagnostics Request starting HTTP/1.1 GET http://sub.domain.com/app/.env - null null
Microsoft.AspNetCore.Hosting.Diagnostics Request finished HTTP/1.1 GET https://sub.domain.com/app/.env - 404 0 null 16.0761ms
Microsoft.AspNetCore.Hosting.Diagnostics Request reached the end of the middleware pipeline without being handled by application code. Request path: GET https://sub.domain.com/app/.env, Response status code: 404
Microsoft.AspNetCore.Hosting.Diagnostics Request starting HTTP/1.1 GET http://sub.domain.com/dev/.env - null null
Microsoft.AspNetCore.Hosting.Diagnostics Request finished HTTP/1.1 GET https://sub.domain.com/dev/.env - 404 0 null 20.7351ms
Microsoft.AspNetCore.Hosting.Diagnostics Request reached the end of the middleware pipeline without being handled by application code. Request path: GET https://sub.domain.com/dev/.env, Response status code: 404
UniversalAutomation.GroomService Starting groom job.
UniversalAutomation.GroomService Groom date is: 1/21/2025 6:46:02 PM
UniversalAutomation.GroomService Finished groom job.
Microsoft.AspNetCore.Hosting.Diagnostics Request starting HTTP/1.1 GET http://sub.domain.com/new/.env - null null
Microsoft.AspNetCore.Hosting.Diagnostics Request finished HTTP/1.1 GET https://sub.domain.com/new/.env - 404 0 null 20.1132ms
Microsoft.AspNetCore.Hosting.Diagnostics Request reached the end of the middleware pipeline without being handled by application code. Request path: GET https://sub.domain.com/new/.env, Response status code: 404

I do not have, for example, I dot have the PHP file lara/nfo.php nor do I know of any lara path, heck I do not know anyone called lara!

Same goes for xampp/phpinfo.php, I do not recognize this at all.

By the way, when I try these URL’s in a browser I get only a blank page

Anyone have any idea if these are legit calls?

I have Nginx Proxy Manager in front of Universal so anything I expose is going through that first.

Product: PowerShell Universal
Version: 5.2.3

Jobs failing most of the times

avatar
avatar
avatar
avatar

Not sure if it will help or is related but I had a similar question/issue as you it seems, here is the thread:

Timeout setting ‘Job Handshake Timeout’ is not used it seems

Advice on which Devolutions Powershell module to use

avatar
avatar
avatar

Hi Erica,

Thanks for the message. I will be on a holiday for 3 weeks so either I need to come back to this thread later or my collegue will continue this discussion.

Thanks for the offer to have a support session should we need it. If that is the case I will get in touch with our team managing RDM/DVLS and get he license information so we can have a proper ticket started for that.

Regards,

Steven

Advice on which Devolutions Powershell module to use

avatar
avatar
avatar

Hi Erica,

Thanks for the explanation about the help files.

So what you are saying is that the module we use is not compatible with DVLS? If that is the case, what would be the best approach? We cannot downgrade DVLS. We could install a specific version of the module if there is one?

Regarding the Verb-RDMxxx cmdlets, we already have a central data storage with DVLS, I hope that by going through the RDM cmdlets we can connect with that datasource and work on/in it? Just as if we used the DS cmdlets?

The error is coming from what worked before, I assume an update/upgrade of DVLS will not alter or change the service account we created? Or the rights it has? Everything was set before the update/upgrade hence I assumed this would still work the same.

Regards,

Steven

Advice on which Devolutions Powershell module to use

avatar
avatar
avatar

Hi Erica,

Thanks for your answer and explanation!

Is there a help guide for the cmdlets/functions, where they are all described, parameters explained and examples listed?

I tried the cmdlet "Get-RDMDataSource" and as long as you have RDM installed locally that will get information. However, I want to make sure I am 'talking' to the Devolutions Server, meaning that all actions I want to achieve need to end up in the right place, i.e. the backend (server).

The goal is to make changes to DVLS for all users to see, not just locally where I execute the commands to work with RDM.

So perhaps there is a way to make sure I authenticate/session and execute cmdlets that adhere to the session to DVLS? Or perhaps my understanding on how this works is wrong?

Edit:

Today we tried the following code, something that got us the Vaults at lest but as of today we get different results. DVLS was updated last week, so the Server version is now "2023.2.4.0"

Our Powershell module "Devolutions.Powershell is version "2023.2.0.2"

Import-Module -Name Devolutions.PowerShell
$RDM_URL = 'https://xxx.xxxxxxx.xxx/dvls'
$RDM_AppId = 'xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
$RDM_AppSecret = 'very_secret_code'
[securestring]$RDM_AppPassword = ConvertTo-SecureString $RDM_AppSecret  -AsPlainText -Force
[pscredential]$RDM_Credential = New-Object System.Management.Automation.PSCredential ($RDM_AppId, $RDM_AppPassword)
$Result = New-DSSession -Credential $RDM_Credential -BaseURI $RDM_URL -AsApplication -Verbose
VERBOSE: [Login] Beginning...
VERBOSE: [New-DSSession] Server version: 2023.2.4.0
VERBOSE: [New-DSSession] Authenticating as xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
VERBOSE: [New-DSSession] Completed successfully.
$Result

DetailedErrorMessage ErrorMessage IsSuccess  Result
-------------------- ------------ ---------  ------
                                       True Success

Get-DSVaults

Get-DSVault: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Devolutions.Server.ApiWrapper.Paging.PagedResult`1[Devolutions.RemoteDesktopManager.Business.Entities.RepositoryEntity]' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path 'data', line 1, position 25.

Any idea what might be happening here?

PS: I will include my colleague Michael Weishaar, by sending him to this forum thread, as I will be on holiday next week and he can follow up and communicate further should that be needed.

Regards,

Steven

Advice on which Devolutions Powershell module to use

avatar
avatar
avatar

We have a Windows server with Devolutions Server installed and also Desktop Manager.

We have a remote Linux server with Powershell Core 7.2

So we have 1 vault/data source for the whole company.

This contains all RDM connections and secrets stored, items are filtered via access rights.

We want to create and update entries in the vault/ds that all users of Dektop Manager will see if they have the proper rights.

What we would like to have some advice on which Powershell module to use.

We can see both modules "Devolutions.PowerShell" and "Devolutions.Server"

Which one would suit our needs the best, given that we have access to the Server and certainly will and can execute scripts on there but we also want to be able to do all the same actions from that remote Linux server.

Please note that accessing the URL/server from that remote Linux server will not be an issue, we can communicate between them.

We have this as a tryout atm but we think we are not on the right path:

Import-Module -Name Devolutions.PowerShell

$RDM_URL = 'https://domain/dvls'

$RDM_AppId = 'xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'

$RDM_AppSecret = 'our_very_long_app_secret'

[securestring]$RDM_AppPassword = ConvertTo-SecureString $RDM_AppSecret -AsPlainText -Force

[pscredential]$RDM_Credential = New-Object System.Management.Automation.PSCredential ($RDM_AppId, $RDM_AppPassword)

$Result = New-DSSession -Credential $RDM_Credential -BaseURI $RDM_URL -AsApplication -Verbose

VERBOSE: [Login] Beginning...

VERBOSE: [New-DSSession] Server version: 2023.2.4.0

VERBOSE: [New-DSSession] Authenticating as xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

VERBOSE: [New-DSSession] Completed successfully.

Result is:

DetailedErrorMessage ErrorMessage IsSuccess Result

-------------------- ------------ --------- ------

True Success

When we then try this command:

Get-RDMCurrentDataSource

We get a popup browser to authenticate. Once I have done that, we get some info from that command.

But we got a session started and OK authenticated already with "New-DSSession".

Safe to say, we are confused and think we are mix-matching items and are not handling this properly, hence the ask for advice on which module to use and which commandlets to use. We see mixes og "Verb-DSxxxxx" and "Verb-RDMxxxxx" cmdlets, is this right?

Thanks and regards,

Steven Spierenburg

UD v4 - creating a new app fails without modifying/adding/deling what was produced by UD itself

avatar
avatar
avatar

Another issue just popped up for me. When I go to the generated pages and try to save a page, I get an error message. Just created a new App, went to the pages, edit one and tried to save it. The edit was just adding a ‘1’ to the text ‘Groups’, nothing more. Tried to restart PSU as well, did not help.

UD v4 - creating a new app fails without modifying/adding/deling what was produced by UD itself

avatar
avatar
avatar

I just tested this in release 4.0.4 and the issue is now resolved.

Thanks!

UD v4 - creating a new app fails without modifying/adding/deling what was produced by UD itself

avatar
avatar
avatar

Just tested 4.0.3 and this issue is still present,

Can RDM use my local SSH configuration to connect to a remote host?

avatar
avatar
avatar
avatar
avatar

Oh wow, this thread/question is still active? Man, I gave up on this months ago, no solution and had to move on without the vendor.

Curious though, why does thuis take so long?

UD v4 - creating a new app fails without modifying/adding/deling what was produced by UD itself

avatar
avatar
avatar

I have UD V4.0.2

When I go to Apps and create a new app, based on the multi page template, the app never runs.

I never touched any of the components or pages or settings, I just created the TestApp and try to run it/view it.

The View App results:

Page not found
at <ScriptBlock>, /root/.PowerShellUniversal/Repository/dashboards/TestApp/TestApp.ps1: line 14
at <ScriptBlock>, <No file>: line 1
System.Exception: Page not found
   at UniversalAutomation.GetDashboardPageCommand.BeginProcessing() in C:\actions-runner\_work\universal\universal\src\Cmdlets\GetDashboardPageCmdlet.cs:line 21
   at System.Management.Automation.Cmdlet.DoBeginProcessing()
   at System.Management.Automation.CommandProcessorBase.DoBegin()
Page not found
at <ScriptBlock>, /root/.PowerShellUniversal/Repository/dashboards/TestApp/TestApp.ps1: line 15
at <ScriptBlock>, <No file>: line 1
System.Exception: Page not found
   at UniversalAutomation.GetDashboardPageCommand.BeginProcessing() in C:\actions-runner\_work\universal\universal\src\Cmdlets\GetDashboardPageCmdlet.cs:line 21
   at System.Management.Automation.Cmdlet.DoBeginProcessing()
   at System.Management.Automation.CommandProcessorBase.DoBegin()
Page not found
at <ScriptBlock>, /root/.PowerShellUniversal/Repository/dashboards/TestApp/TestApp.ps1: line 16
at <ScriptBlock>, <No file>: line 1
System.Exception: Page not found
   at UniversalAutomation.GetDashboardPageCommand.BeginProcessing() in C:\actions-runner\_work\universal\universal\src\Cmdlets\GetDashboardPageCmdlet.cs:line 21
   at System.Management.Automation.Cmdlet.DoBeginProcessing()
   at System.Management.Automation.CommandProcessorBase.DoBegin()
Cannot bind argument to parameter 'Pages' because it is an empty array.
at <ScriptBlock>, /root/.PowerShellUniversal/Repository/dashboards/TestApp/TestApp.ps1: line 16
at <ScriptBlock>, <No file>: line 1
System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Pages' because it is an empty array.
   at System.Management.Automation.ParameterBinderBase.ValidateNullOrEmptyArgument(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, Type argumentType, Object parameterValue, Boolean recurseIntoCollections)
   at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
   at System.Management.Automation.CmdletParameterBinderController.BindParameter(CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
   at System.Management.Automation.CmdletParameterBinderController.BindParameter(UInt32 parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
   at System.Management.Automation.CmdletParameterBinderController.BindNamedParameter(UInt32 parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter)
   at System.Management.Automation.ParameterBinderController.BindNamedParameters(UInt32 parameterSets, Collection`1 arguments)
   at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
   at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
   at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
   at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
   at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
   at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
--- End of stack trace from previous location ---
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

The App folder structure:

The TestApp code page:

Product: PowerShell Universal
Version: 4.0.2

Can RDM use my local SSH configuration to connect to a remote host?

avatar
avatar
avatar
avatar
avatar

We have Azure VM's running that we can connect to via SSH.

We have to generate SSH keys as they expire after a while.

This information (host IP, keyfiles, etc) is stored in my personal .ssh folder in the config file

it is generated like so with the Azure CLI:

az login

az ssh config

This results in 3 ssh key files:

.ssh/az_ssh_config/<snipped>/id_rsa

.ssh/az_ssh_config/<snipped>/id_rsa.pub

.ssh/az_ssh_config/<snipped>/id_rsa.pub-aadcert.pub

In my ssh config file (~/.ssh/config) I have:

Host MASKED_RG_VM_NAMES

User xxx@xxx.com

HostName 20.nn.nn.nn

CertificateFile ".ssh/az_ssh_config/<snipped>/id_rsa.pub-aadcert.pub"

IdentityFile ".ssh/az_ssh_config/<snipped>/id_rsa"

Host 20.nn.nn.nn

User xxx@xxx.com

CertificateFile ".ssh/az_ssh_config/<snipped>/id_rsa.pub-aadcert.pub"

IdentityFile ".ssh/az_ssh_config/<snipped>/id_rsa"

(some hostnames and ip addresses are masked or snipped and paths shortened to prevent sensitive information being posted)

When I use VS Code I can connect to a remote via SSH in the command palette and VS code will offer me all the entries from my ssh config file.

I have 2 questions:

1) Can RDM also use these entries from my ssh config file as well? If so, how?

2) I have a script that renews the key files from Azure and alters the ssh config file. This script is written in Powershell but as I am on a MacOS I get the message from RDM that I cannot use Powershell. Why is that?

It is a bit odd that RDM on MacOS is complaining about Powershell scripting, Powershell has been multi platform for quite a while now and I would assume RDM woant to make good use of that, but it won't.

Any timeline on supporting Powershell Core on MacOS in RDM?

Trying to run a script on a connection with Powershell but it fails

avatar
avatar
avatar

Thanks for the response.

So this means the IP/URL will change in memory only and only temporarily (how long?)?

Could you perhaps answer these questions?

1) Why would the $RDM.Save() method be called if it does not actually save?

2) I cannot see that method on the $RDM object, how is this supposed to work then?

3) What would be the correct location where all this is explained and the object model(s) are explained?

4) Running scripts (so not on events) poses the same question, where can I find what you get in respect to scripting (objects, methods, sessions, etc.)?

Thanks!

Regards,

Steven

Trying to run a script on a connection with Powershell but it fails

avatar
avatar
avatar

Hi Erica,

This does not seem to work for me.

This is what I tried to set and nothing works or shows in the GUI properties in RDM when I edit the connection in RDM.

$RDM.Connection.Host = 'ConnHost'

$RDM.Connection.HostIP = '66.66.66.66t'

$RDM.Save()

$RDM.connection.host = '44.44.44.44'

$RDM.save()

$RDM.Connection.Name = 'AAAAAAAAAA'

$RDM.Save()

Nothing works, nothing is set in the properties of the connection as I would have expected.

Your example works to save the settings with :

$RDM.Save()

I dumped several methods and properties from the $RDM object, this is on the "Before Open" event.

$RDM | gm | Out-File -FilePath c:\temp\rdm.methods.txt -Force -Encoding ascii

$RDM | Out-File -FilePath c:\temp\rdm.values.txt -Force -Encoding ascii

$RDM.Connection | gm | Out-File -FilePath c:\temp\rdm.connection.methods.txt -Force -Encoding ascii

$RDM.Connection| Out-File -FilePath c:\temp\rdm.connection.values.txt -Force -Encoding ascii

$RDM.Prompt | gm | Out-File -FilePath c:\temp\rdm.prompt.methods.txt -Force -Encoding ascii

$RDM.Prompt | Out-File -FilePath c:\temp\rdm.prompt.values.txt -Force -Encoding ascii

Looking at the $RDM object methods available:

TypeName: Devolutions.RemoteDesktopManager.Managers.PowerShellManager+PowerShellEventProxy

Name MemberType Definition

---- ---------- ----------

Equals Method bool Equals(System.Object obj)

GetHashCode Method int GetHashCode()

GetType Method type GetType()

ToString Method string ToString()

Cancel Property bool Cancel {get;set;}

Connection Property RemoteDesktopManager.AddOn.ISession Connection {get;}

Prompt Property Devolutions.RemoteDesktopManager.Business.OpenSessionComment Prompt {get;}

I see no "Save" method, or am I mistaken?

Do I need to get some object/connection/datastore/whatever in order to be able to change properties and save a connection?

And can I ask, where is the explanation on the $RDM object, the scopes at various points and all that? I have no clue about this object atm.

And is this object available when I execute scripts on a connection? I mean, not the events and running a script, I mean creating a PS script and calling that:

Is there some documentation on scripting with Powershell and the objects you can use (methods and properties) at various points of scripting in RDM?

Right now I am kinda reverse engineering that info a bit by dumping methods and properties as shown above, that is not exactly ideal.

Regards,

Steven

Trying to run RDMP via command line with .rdp file as parameter

avatar
avatar
avatar

Hi There,

I have the RDM Client 2022.3.13.0

This client is running on MacOS Ventura if that matters in this case.

I'm trying to run RDM from the command line with a .rdp file as parameter.

We have an external system that delivers timed (i.e. the rdp files are invalid after 30 seconds if not connecting) rdp files. I would like to be able to start RDM with that RDP file, point to a save credential (or inherit) to use and start the RDP session.

Is this possible?

Regards,

Steven

1 - 25 of 32 items