Forcing Open-RDMSession to return an error.

Forcing Open-RDMSession to return an error.

avatar
pchacon
Disabled

Hello,

I would like to know if is a way to get an error from "Open-RDMSession"

I want to make a Re-try policy in my script, but i dont know how to make Open-RDMSession return an error (in case it cant make a connection), any advice on this? is this possible?

Thanks in advance

All Comments (2)

avatar


Hello,

I am afraid to say that it is not possible to get any information from a session launched using the Open-RDMSession cmdlet because it's a one way communication and the cmdlet doesn't wait for the end of the launched process.

In fact, the cmdlet will launch the session like you will manually launch it using the Command line parameter in the Advanced tab of the session's properties.
https://help.remotedesktopmanager.com/entrytypes_advanced.htm#ids-(used-in-a-command-line-or-in-powershell-scripts)



After a discussion with an engineer, he could investigate this behaviour but to be honest, we are not confident to provide any solution on this request.


Best regards,

Érica Poirier

avatar

oh i see, and do you know another way to know programmatically check for connection errors? or if is a way to send a mail on a failed connection.
Basically i want a script or something like that checking for my rdp connections and sending mails if some of the connections can't connect. Do you know if RDM have tools to help me achieve this? i would really appreciate any kind of help or advice on this.

Best regards