Jump to content
  • 0

Get-BrokerMachine : Failed to connect to back-end server 'localhost' on port 80 using binding WSHttp. when using Citrix Cloud powershell from command line (poweshell.exe calling a ps1 script)


Question

Get-BrokerMachine : Failed to connect to back-end server 'localhost' on port 80 using binding WSHttp. when using Citrix Cloud powershell from command line (poweshell.exe calling a ps1 script)

 

Script works from powershell ISE, but if i save the script as a PS1 file and call it from powershell.exe from within a .net app and set UseShellExecute = false it fails

 

Script:

asnp citrix.*
Set-XDCredentials -ProfileType CloudApi -CustomerId "xxxx" -APIKey xxxx -SecretKey xxxx
Get-XDAuthentication
$vm = Get-BrokerMachine -HostedMachineName xxxx
$vm.SessionCount

 

Calling the script with UseShellExecute = True it works, but then I can't capture the output of the script

Link to comment

2 answers to this question

Recommended Posts

  • 0

I have seen this before. A coworker couldn't get any commands working in PowerShell ISE whereas on the same Cloud Connector I had no issue. As it turns out the issue is he was using the 32-bit version of PowerShell ISE; PowerShell ISE (x86).

 

It makes sense. Using 32-bit Powershell against back end 64-bit services is bound to run into problems. I just wish the error was more descriptive. I was able to reproduce the issue with both 64 and 32 bit versions of PowerShell ISE running side by side.  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...