If the XenDesktop connection does not work, you can test the connection using the following PowerShell commands:
Add-PSSnapin Citrix.Broker.Admin.V2
Get-BrokerController -AdminAddress <BrokerIP/or Name>
More information on the Get-BrokerController command can be found here.
asnp Citrix*
This loads all Citrix-specific PowerShell modules.- Parameter
-AdminAddress
Instructs PowerShell to run the command on the XenDesktop controller.

If you do not get any results, the connection is not working and there might be an issue with your network, permissions issue, or the server itself is not configured correctly.