Posts

Showing posts with the label script

Get Alerts for Low UPD and FSLogix disk space

One of the hurdles of UPDs and FSLogix is that they cause issues if they run out of space, and they don't alert users when they are out of space. In some cases you will waste time troubleshooting when you could have resolved it in a minute by just cleaning up the disk. I created the script below to address this issue. You can run it against your RDS servers and gateway, and you will not need to modify anything beyond the SMTP settings, thresholds, and exclusions. The script will do the following: Exit if it is not run on a server (you can comment this out if you use UPDs on Desktops) Query all collections on the RDG and scan all UPD paths *Must be run on the Gateway for this to work Query FSL Profile and ODFC paths *Must be run on computers with FSL enabled If low space disks are found the script will send you an email with a table of all the paths If nothing is found the script will exit. Known limitations: The script might report false positives/negatives if...

Script to Logout all Users Before Restarting RDS Servers

Multiple vendors have recommended logging out all users before restarting our RDS servers. Sadly I was never able to find a script that could do everything I wanted. I created the script below for Server 2012 + servers. The script will do the following: Logout all active users (even console users) Write errors and information into the Application event log You can find the script here:  https://github.com/andy2002a/PowerShell/blob/master/RDS/Disconnect-LoggedOnUsers.ps1 The script will not reboot the server, but you can always add a shutdown -r -t 0 at the end, or schedule your reboot script to run right after this one.