If the XenDesktop connection does not work, you can test the connection using the following steps:
Get-BrokerController -AdminAddress <BrokerIP/or Name>
More information on the Get-BrokerController command can be found here.
This loads all Citrix-specific PowerShell modules.
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.