How to use in DB saved ps script in Before opening event?

How to use in DB saved ps script in Before opening event?

avatar

I have a PS script which I am able to use only in "Before opening" event when it is saved on the disk selecting "Execute PowerShell" like ($RDM
. "NoMachine\NoMachine.ps1"
GetRemoteIP
WriteNoMachineConfig"). I like to have this script (NoMachine.ps1) in the DB and load it from there. I see "Execute macro/script/tool" which looks fine at the first glance but it is actually useless due to loosing the $RDM object. Perhabs a new PS instance get instanciated not using the one having the actual connection. It is possible to do what I wanna do or it is a missing implementation. It would be more convenient to edit script in one place in the DB as at every location and keep tracking on versioning etc.

All Comments (2)

avatar

Hello,

Thank you for reaching out to us regarding this,

Could you please specify the version of RDM you are currently using?
What type of data source are you using?

Additionally, if possible, could you provide us with some screenshots of your current configuration? What are you looking to achieve with this script exactly?

Let me know,

Best regards,

Samuel Dery

avatar
Hello,

Thank you for reaching out to us regarding this,

Could you please specify the version of RDM you are currently using?
What type of data source are you using?

Additionally, if possible, could you provide us with some screenshots of your current configuration? What are you looking to achieve with this script exactly?

Let me know,

Best regards,


@Samuel Dery
Hello,

I am testing 2025.2.30.0 on behalf of my customer who like to use something like DRDM at his bussines. He currently using ultraVnc and NoMachines. Since - so far I was able to determine - this is the last version support embaded ultraVnc I kind of "stuck with" this version. NoMachine integration is rudimentary as well but with PS I was able to get it working but since the scripts are kind of big and we need several support stations maintaining the scripts centralized is very much needed. But I was not able to figure out how could I load the scripts from the database without loosing the $RDM object so members like $RDM.Connection.Host is not existing. I my logic in tha attached picture there should be a selection of script from DB but there is none.
DRDM-NoM.jpg

DRDM-NoM.jpg