Unable to open "Remote Desktop Protocol" (RDP) URLs from command-line I am unable to open RDP URLs from the command-line.

Whenever I try to open RDP URL from command line by executing the following:

open rdp://localhost/


or any other IP address, I get the following error:


  The URL is not valid. Notify your network administrator.


I am able to connect to the host using Microsoft Remote Desktop (8.0.43).

How do I open RDP connection using command-line?



To clarify, this answer claims that there is no command to access MS RD app, but it's not correct, since running the open command opens the app correctly, however there is the following error:
According to Remote Desktop client URI scheme support, the correct syntax is:

open rdp://full%20address=s:localhost


This also works:

open rdp://address=s:localhost




For convenience, the following shell function can be defined:

# Compare two binary files.
# Usage: open-rdp ip.address
open-rdp() {
  open rdp://full%20address=s:$*
}


Note: The above code can be copy &amp; pasted into terminal or added into shell startup rc files.

Usage:

open-rdp IP.Address