Good day! This time a niche script for those customers that use terminal/remote desktop servers with User Profile Disks. For people unsure about what User Profile Disks (UPD's) are. They are profile folders located on for example a file server that get loaded onto a terminal server the moment the user it belongs to logs in. These contain the user-data files (documents, appdata etc. etc.). This saves space and allows you to easier set limits to how big their profile is allowed to be. However .. problems can arise at times and if a UPD gets stuck on one of the terminal servers while the user gets directed to a different one (giving that employee constant temporary profiles) it can get annoying real quick to find out where it is stuck (as usually the best way is to manually disconnect the disk from the server), especially when you have multiple servers with 10+ users on it. Running this script over the servers is quite quick and all you have to fill in is the username it needs to find the UPD from in variable $UserSearch. What it does is that it gets all the connected disks connected to the server through WMI and then connects to/retrieves all information on those disks ranging from security settings to size. In the security settings it can see the users that have access to the UPD which normally are only system accounts and the user self. It outputs that information and with a simple -match command, it tries to match the username you gave up as variable to the username that is attached to the UPD. Aside from that it also shows exactly which disk it is in the disk manager (aka, you will know where to look in the list within disk manager) Example: I have had employee's that kept getting temporary profiles and it showed their UPD as attached even when not logged in. What I could do is go through 5+ terminal servers and look at the security settings of all 10+ disks per server to see where their disks were attached ... however I instead ran this script over the servers with the username as variable and it wasn't long before one of the runs told me at which server it was located and about which disk it would be in the disk manager. This saved me about 20 minutes of searching. While these are very niche scenario's, it can happen and as such I felt it was worth sharing. So hopefully it will help more than just me. - Powershellder Categories: Disk, User, Powershell, Windows, Server, Script
2 Comments
Zane
31/10/2019 20:31:31
This is awesome. I am looking for a way to go through my UPD users and check available space to pre-empt support requests.
Reply
14/11/2019 21:51:29
Sorry for the late reply (It has been a busy time at work)
Reply
Leave a Reply. |
AuthorPatrick Berger AKA Powershellder. Categories
All
Archives
March 2021
|
[ i ] Parallax section below. Click on the section below to upload image. Don't worry if it looks weird in the Weebly editor. It'll look normal on your published site.
To edit or delete your image, press the "toggle" button below. Then, hover over your image until a popup appears with the "edit" and "delete" options. If you don't want a white content section, leave it blank. It will disappear on your live website.
