Here’s a little script I wrote to help me prep golden images in provisioned environments (pooled VMs) with AppSense DesktopNow. There is an excellent best practices guide on Citrix Provisioning Server and AppSense but I’m not sure it’s publicly available because I couldn’t find it on myappsense.com or I would link to it. I got it directly from an AppSense SE a while back. This script clears the CCA GUIDs for you as recommended in this best practices guide. If you don’t clear the GUIDs then all your standard images come up and check in with the AppSense Management Server with the same GUID which can lead to very weird behavior like missing data or settings. You can burn it right into an admin tools folder in your private golden images or run it remotely, whatever you prefer. When I’m ready to go from private to standard, I just run this bat file before shutting down. Works great for me.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
:: AppSense/Citrix PVS private image CCA prep script :: Created by Jason Samuel - www.jasonsamuel.com :: This will stop the CCA service net stop "AppSense Client Communications Agent" :: This will wipe the CCA agent GUID in registry for group id reg add "HKEY_LOCAL_MACHINE\Software\AppSense Technologies\Communications Agent" /v "group id" /t reg_sz /d "" /f :: This will wipe the CCA agent GUID in registry for machine id reg add "HKEY_LOCAL_MACHINE\Software\AppSense Technologies\Communications Agent" /v "machine id" /t reg_sz /d "" /f pause |
Once it runs check the registry and you’ll see the keys are now blank:
If the code above runs off the page, just highlight the entire block of code and paste into Notepad to see it all. Alternatively, here’s the script as a .txt file so you can see the whole thing or even rename it to .bat and use it as is (make sure you right click – save as):
Hope this helps. Let me know if you have any PVS + AppSense best practices questions or suggestions.
Jason Samuel is a visionary product leader and trusted advisor with a proven track record of shaping strategy and driving technology innovation. With extensive expertise in enterprise end-user computing, security, cloud, automation, and virtualization technologies, Jason has become a globally recognized authority in the IT industry. His career spans consulting for hundreds of Fortune 500 enterprises across diverse business sectors worldwide, delivering cutting-edge digital solutions from Citrix, Microsoft, VMware, Amazon, Google, and NVIDIA that seamlessly balance security with exceptional user experiences.
Jason’s leadership is amplified by his dedication to knowledge-sharing as an author, speaker, podcaster, and mentor within the global IT and technology community. Recognized with numerous prestigious awards, Jason’s contributions underscore his commitment to advancing technology and empowering organizations to achieve transformative results. Follow him on LinkedIn.