I want to find a way to share some Microsoft RDP configuration information with my team.
Where does Microsoft RDP 8 for Mac store its connections and configuration?
If you want to share a configuration you can select the target under My Desktops and either right-click and select Export or from the Microsoft Remote Desktop File menu select Export.
The file that contains the information shown in the Microsoft Remote Desktop window, sans any passwords which are stored in your Keychain, is located at:
/Users/$USER/Library/Containers/com.microsoft.rdc.mac/Data/Library/Preferences/com.microsoft.rdc.mac.plist
For MS RDP 10, I had to copy two folders: /Users/~/Library/Containers/com.microsoft.rdc.mac /Users/~/Library/Containers/Microsoft Remote Desktop
Hope this helps...
com.microsoft.rdc.macos.plist
- note macos
instead of mac
. Tried replacing the file with a backup after deleting some profiles and didn't restore.
As an answer to the comments elsewhere in this question, here's a small program msrdp-credential-dumper
that retrieves MS-RDP connections and their stored passwords from the macOS Keychain. Visit the GitHub repo luckman212/msrdp-credential-dumper to download.
DB="$HOME/Library/Containers/com.microsoft.rdc.macos/Data/Library/Application Support/com.microsoft.rdc.macos/com.microsoft.rdc.application-data.sqlite"
[[ -r $DB ]] || { echo 1>&2 "database could not be accessed"; exit 1; }
MAXCOLS=$(tput cols)
[[ -n $MAXCOLS ]] || MAXCOLS=80
export C1=$(( MAXCOLS / 4 ))
export C2=$(( MAXCOLS / 5 ))
( tput bold ; tput smul ;
printf "%-${C1}s %-${C2}s %s\n" Name Hostname 'Username/Password' ;
tput sgr0 ;
while IFS='|' read -r B_ZFRIENDLYNAME B_ZHOSTNAME C_ZID C_ZUSERNAME _ ; do
PASSWD=$(security 2>/dev/null find-generic-password -w -s com.microsoft.rdc.macos -a "$C_ZID")
printf "%-${C1}s %-${C2}s %s\n" "${B_ZFRIENDLYNAME:0:$C1}" "$B_ZHOSTNAME" "${C_ZUSERNAME:--}${PASSWD:+ / $PASSWD}"
done < <(sqlite3 "$DB" <<-EOS
SELECT
b.ZFRIENDLYNAME,
b.ZHOSTNAME,
c.ZID,
c.ZUSERNAME
FROM
ZBOOKMARKENTITY as b
LEFT JOIN ZCREDENTIALENTITY as c on b.ZCREDENTIAL = c.Z_PK
ORDER BY b.ZFRIENDLYNAME
EOS
)
)