Sep. 12, 2016
Since we released ControlUp 4.1 we have received a lot of feedback regarding the Logon Duration monitoring feature.
One of the main requests was to better explain our "Logon Duration - Other" component (which included any delay not caused by Profile, GPO or the Desktop component) and provide an easy way to find the culprit for slow logons.
Based on this feedback we decided to write a PowerShell script that will enable any Citrix and Windows admin to troubleshoot a slow logon process without requiring any 3rd party tools. The same script can also be executed through the ControlUp Script-based Actions feature.
This post will describe how the script works, the major logon phases it covers, the script prerequisites and a short video showing how the script helps troubleshooting two slow logon scenarios.
Analyze_Logon_Duration.ps1 is a PowerShell script that displays all major sequential phases of the logon process and makes it easy to see which phase is slowing down the user logon. It is also possible to see if there is a delay between the end of one phase and the start of the next one.
Here is a screenshot of the script output showing the logon duration analysis for a user called cuupm logging on to a XenApp server:
Some notes on the script output:
The following table summarizes the logon phases the script covers and the Windows events used for calculating the start and end time for each phase:
|Logon Phase Name||Logon Phase Description||Start Event||End Event|
A Network Provider is a DLL that is responsible for a certain type of connection protocol1. On each logon Winlogon notifies these Network Providers so they can collect credentials and authenticate the user for their network2. Citrix PnSson is a common network provider found on XenApp and XenDesktop VMs.
Group Policy**See also a detailed Group Policy load time script.
The following are the script prerequisites:
Note - one customer encountered an issue where enabling auditing via a GPO didn't apply to the target computers. The fix is described here – Microsoft KB921468.
Perform the following steps to execute the script via PowerShell:
Analyze_Logon_Duration.ps1 (download link)
The following video demo shows how the Analyze Logon Duration PowerShell script helps identify the root cause of a slow logon for two user sessions:
With a bird's-eye-view of your VDI environment, hypervisors to individual processes, ControlUp provides performance visibility and end-user experience metrics to easily detect, troubleshoot and remediate issues in real-time and within context. Proactively apply best practices through ControlUp Insights to measure system health and give you definitive answers for everyday IT questions.
Learn more about ControlUp in this Citrix Ready blog post: ControlUp 4.0 - New XenServer/vSphere Support and Enhanced IOPS Troubleshooting. Get a free 30-day trial - www.controlup.com.