How can I run a local powershell script from an entry in my navigation pane.

How can I run a local powershell script from an entry in my navigation pane.

avatar

I created a script that we run through to create new entries in RDM

Currently I have to open the PowerShell RDM CmdLet from the tools menu then paste the command

"\LocalServer\Software\Remote Desktop Manager\Scripts\createclient.ps1"


Is there a way to do this from an entry so I can just double click the entry and it will open the embedded powershell and execute the script?

thank you.

All Comments (8)

avatar

Hi,

Depending on whether you would like to run your powershell on a session (RDP as an exemple), if yes please use the Powershell entry in Macro/Scrips/Tool. Here is a topic to help you.
Otherwise if you would like to run your script manually for something else you can use the Session Powershell entry. Here is a topic.

In both ways you have to choose the Embedded script to copy your script inside the entry.

Best Regards,

David Grandolfo

avatar

I have tried this but when I execute the script, nothing happens.
The powershell module does not open?

avatar

Hi,

Do you have an error in the application log ?
Does the application Powershell is install in your computer ?

Best Regards,

David Grandolfo

avatar

I will check the application log.

Yes I have powershell installed as I can open the module from within RDM and run the script from the powershell prompt.

The script requires a lot of user input and it adds groups and connections to RDM

Should it open a powershell tab in RDM when executed as an embedded script?

avatar

Hello,

What type of PowerShell entry are you using?

Could you please post a screen shot of the properties of this PowerShell entry?

Best regards,

Érica Poirier

avatar

see attached screen shot.
I coped the code from my powershell script to the embedded option as suggested

Script.PNG

avatar

Hello,

I see in your screen shot that you are using the PowerShell macro/script/tool entry type.

Could you please use a PowerShell session type from the Other session category? Here is the online help page about that entry type https://help.remotedesktopmanager.com/sessions_powershell.htm



Best regards,

Érica Poirier

avatar

Thank you I now have this working.
I find it a little slow to start though