This script allows you to get the email addresses of terminal server users, so you may later paste them into the “To:“ line of an email.
In the past I used NET SEND /Users to notify users that the terminal server they were logged onto was going down for maintenance. Because of security concerns, the messenger service is often turned off, disabling NET SEND and creating a problem as to how to a message to the logged on users of a terminal server.
Mail2TSUsers.vbs gets the email address of terminal server users and puts them into your clipboard to notify them of downtime. I was going to create an email message but good security practices mean your admin account is not mail enabled.