The first step is to connect to Connection broker using the Connect-HVServer cmdlet.
You can run this using PowerCLI on the Connection Broker or install the PowerCLI Modules on a remote server.
For more info about using PowerCLI in Horizon environments you can take a look at this site. He posts a lot about this subject.
https://www.retouw.nl/powercli/pulling-horizon-session-information-using-powercli/