I would like to know the values which are returned by invoking mstsc.exe in PowerShell. I am writing a PowerShell script to automate RDP check. However, I am unable to identify the servers for which the RDP is failing? I have tried using try-catch and if-else, however it is not helping.
Asked
Active
Viewed 282 times
0
-
2`mstsc` is not a console application. AFAIK, it does not return any codes. – Maximilian Burszley Oct 20 '17 at 16:06
-
You can check to see if a connection is available by seeing if port 3389 accepts connections – Nick.Mc Oct 21 '17 at 06:32