Create a new VMware vCenter Hosting Connection with SSL Trust in Citrix 7.x with PowerShell

Just a small new blog, as you know my motto is “Automate Everything”! Well, the past weeks I’ve been busy with just that. I’m at a customer and we are creating a completely automated Citrix 7.15.1 Environment deployment. And one problem I ran into was adding the vCenter connection into hosting through PowerShell. I found this blog on the Citrix blogs about this topic: https://www.citrix.com/blogs/2013/10/30/scripting-howto-xendesktop-7-hosting-configuration/

But the script in the blog will give a certificate error because you need to import and trust the vCenter certificate to use it as a hosting connection. So I created the script below to download the certificate from the URL, import the certificate, get the thumbprint and create a hosting connection in Citrix XenDesktop 7.X

I hope this was informative. For questions or comments you can always give a reaction in the comment section or contact me: