Get Home and RDP Home directories

Prior to migrating a dozen remote file/print servers at remote locations we need to figure out who has homefolders where, as well as if they had an RDP home folder and where that lives. About half of our staff can remote access privileges and RDP to a single term server, which is where the RDP home folders come in. This is the solution I came up with. The output of this lists people by first name last name, username, homedirectory location, and RDP Home folder location. If they have none set, it returns "No".

Source Code

This script has not been checked by Spiceworks. Please understand the risks before using it.