New Script: Get Offline Scout Data
Imagine you are in a Citrix environment where Internet and online access is forbidden. Where it is forbidden by company policy to enable PowerShell Remoting or Windows Remote Management or the Remote Registry service. How do you run diagnostics for the Citrix Virtual Apps and Desktops Site using the GUI version of Scout? You don’t or can’t. This new script helps work around this issue.
Before I begin to say more about this script, I want to thank four people who helped test, provide feedback, and find flaws in the script.
- Carl Behrent (CTA)
- Rene Bigler (CTP)
- Sam Jacobs (CTP)
- Stuart Donnelson
Without their constant testing and feedback, this script wouldn’t be as complete as it is. Thank you four for your patience, feedback, and testing. I would really like to thank fellow CTP Rene Bigler who did a (for him) late-night debugging session over Zoom to help find a bad logic flaw in the script.
The Citrix Community Rocks!!!
While researching how to automate gathering Scout data for a project, I came across this page. Towards the bottom of the page is an explanation of how to gather Scout data offline. This uses a PowerShell cmdlet, Start-CitrixCallHomeUpload. While I am glad this cmdlet is available, it is pretty dumb cmdlet. There is no option to specify an -AdminAddress parameter to specify a Delivery Controller for a connection. The help text for the cmdlet shows various parameters, of which I could only find one that worked (-OutPath).
There are many Citrix environments that have strict security policies and protocols where access to the Internet is forbidden and any online/Cloud access is prohibited. The only way to gather diagnostic data and have it analyzed it to gather the Scout data, copy the Zip file to a secure computer where Internet access is allowed but monitored and controlled, upload the Zip file to https://cis.citrix.com, wait for the analysis to complete, and download the Scout report.
I hope Citrix is listening and never kills cis.citrix.com. Not every customer allows online access from their Citrix infrastructure or VDAs. If Scout is killed, access to cis.citrix.com is killed, and the only diagnostics available is to use Smart Tools/Smart Check, well I fear there are many Citrix customers who will never gather diagnostics or health data on their Citrix environment(s).
On to the script. The link for gather Scout data lists three prereqs:
- The machine must be running PowerShell 3.0 or later.
- The Citrix Telemetry Service must be running on the machine.
- The system variable
PSModulePathmust be set to Telemetry’s install path, for example, C:\Program Files\Citrix\Telemetry Service\.
The script verifies all three prereqs are met.
If you run the script on a Delivery Controller: creates a zip file named:
Site Name_DDC_DDC Name_yyyy-MM-dd_HHmm_ScoutData.zip
If you run the script on a VDA, attempts to find the VDA’s registered delivery controller and then attempts to find the Site Name.
If the Site name is found, creates a zip file named:
Site Name_VDA_VDA Name_yyyy-MM-dd_HHmm_ScoutData.zip
If the Site name is not found, creates a zip file named:
If there are registry access issues on the VDA, creates a zip file named:
Unable to Determine_VDA_VDA Name_yyyy-MM-dd_HHmm_ScoutData.zip
This script must be run on a Delivery Controller, or a VDA with either Call Home enabled or the Broker_PowerShell_SnapIn_x64 installed. That snapin’s installer is located on the installation media at
\x64\Citrix Desktop Delivery Controller\Broker_PowerShell_SnapIn_x64.msi
This script does not require an elevated PowerShell session.
This script can be run by a Read-Only Site Administrator.
For full health information, you should run this script on every Delivery
Controller in a Site and at least one of each VDA in a Machine Catalog.
The Start-CitrixCallHomeUpload cmdlet does not have a parameter to run
against a remote Delivery Controller or VDA. The cmdlet will also not overwrite
a Zip file if it exists which is why the time is added to the Zip file name.
Once the script has created the Zip file, the file can be copied to another
computer and then uploaded to https://cis.citrix.com as “Upload for self-diagnostics”
There is one issue with the script. If you originally installed the VDA and manually entered the Delivery Controller(s), then uninstalled the VDA, and then reinstalled the VDA with the option “Let Machine Creation Services do it automatically”, the ListOfDDCs registry key still exists but is now empty. If ListOfDDCs is found, the script uses that empty value and assumes the VDA has not received the Group Policy to set that value. If ListOfDDCs does not exist, then the script looks for the HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\MachineIdentityServiceAgent\VdaStateMirror\RegisteredDdcFqdn key and uses that value.
Only the Zip file is uploaded. The two json files are not used, that I am aware of.
I hope you find the script useful.
You can always find the most current script by going to https://www.carlwebster.com/where-to-get-copies-of-the-documentation-scripts/