So we are in the process of transitioning to version 10 and wanted a way to get the current version installed on our clients. Below is the script we are using. Tested with version 8 and version 10. Hope this is useful for someone else.
#!/usr/bin/env bash
RESULT="Not Installed"
if [[ -e /Applications/Microsoft Remote Desktop.app ]]; then
RESULT=$(defaults read /Applications/Microsoft Remote Desktop.app/Contents/Info.plist CFBundleShortVersionString)
if [[ "$RESULT" =~ ^8. ]]; then
RESULT=$(defaults read /Applications/Microsoft Remote Desktop.app/Contents/Info.plist CFBundleGetInfoString)
fi
fi
/bin/echo "<result>$RESULT</result>"
