Powershell Macros on Sub Connections

Powershell Macros on Sub Connections

avatar

Hi,
Been pulling my hair out with this for several hours - trying to run a Powershell Macro against a sub-connection.
Basically it doesn't do anything - no window pops up and nothing runs!
I have a simple PS Macro that just does a Write-Host "Hello World" command. If I execute this on a folder or connection I get a PS window and the "Hello World" message. If I run this on a sub-connection, nothing happens at all....
Running 12.5.4.0. I could upload a screen shot - but there is nothing to show!
Cheers,
Steve

All Comments (7)

avatar

Hi,
This is now assigned to our dev.

Regards

David Hervieux

avatar

Many thanks,
Steve.

avatar

Hello Steve,

Would you please to answer the following questions and/or send a small video with your actions step by step.

The questions:







Regards,

Michaël Beaudin

avatar

Hi Michaël
I am using a Host entry with a sub-connection added via the popup menu (New Entry, New Sub Connection), The sub-connection is just a Command Line running Notepad (but tried with others like Putty).
I can right click on the Host connection and select Macro/Scripts/Tools and select my PS Macro (which is a Macro that just outputs some text for testing). It then runs a new PS session and displays "Hello World".
If I right click and do the same action on the Notepad Sub-connection nothing happens.

Also, I have tried to use the Macro/Script Button (on the Home tab) , rather than right clicking on the entry but this does not seem to show the PowerShell Macros - is there a reason for this?

Cheers,
Steve

avatar

Hello Steve,

Some changes have been made internally and should be available in the next minor release of RDM to fix this issue.

The problem was not that the connection was a sub-connection but rather that it did not have a host setup in it's properties. In the future, only Remote PowerShell entries will need a host to launch properly.

If you want a temporary fix, you can simply put a random host in your properties while waiting for the update.

Regards,

Michaël Beaudin

avatar

Hi Michaël


Thanks for the update. I have retested and you are correct that it works if I have data in the Host field for the subconnection (Notepad!).
Could you see if there is a reason PS macros do not appear in the popup dialog window from the Home\Macro Scripts button?
(I can only access the Macro from the right click menu on the connection)
Cheers,
Steve

avatar

Hello Steve,

The PowerShell macros should be visible in the macro/script menu in the next minor release of RDM.

Regards,

Michaël Beaudin