Check for Citrix Worker Connection Failures with PowerShell

by Stan Czerno February 4, 2023 09:02 CST

In my environment we use Smart Cards to logon and this causes a lot of False Positives in Director. The reason for the False Positives is because people are easily distracted, they are prompted for their Smart Card at the Desktop or Published App Logon and their connection usually times out before the user enters their PIN, not to mention if they do not open the ICA file when using a browser. We do not use FAS so there are tons of Connection Failures in Director in the morning and sometimes you miss when there are legitimate issues.

Since we can have logon storms up to 300 logons per hour in the morning, spread over 4 time zones, I needed something to assist me. Not to mention that sometimes the issue happens in the afternoon when I am less likely to look at Director. I played around with Director Alerts but it is not flexible enough. So I wrote a script to check every 2 minutes for any Worker that has over 10 Connection Failures for the last hour and email an alert.

My usual disclaimer; I am not a very good developer and the script could probably be written better.

Link to Script: 

Check-for-Connection-Failures-GT-10.ps1

Tags: ,

Catergories: Citrix | XenApp | XenDesktop | Powershell

Comments are closed