How to get/modify the join link?

You can use $rdp.sessionInfo.appInfo.joinLink to get the join link, modify it in onsessionstart(sessionInfo) event.