How to customize AWS EC2 hosting connection with PowerShell

If you need to add EC2 connection with different URL or you have to connect to internet via proxy server, please create EC2 hosting connection manually with PowerShell rather than Citrix Studio.

1. Launch PowerShell from DDC host and load all Citrix modules:

asnp citrix*

2. Configure environment variables for proxy server and port:

$server = “<PROXY_SERVER>”


$options = “ProxyHost=$server,ProxyPort=$port”

Note: Replace both <PROXY_SERVER> and <PROXY_SERVER_PORT> with your own one.

3. Run below 2 commands to add AWS EC2 hosting connection:

$hyp= New-Item -Path xdhyp:Connections -AdminAddress “localhost” -Name “AWSEC2” -ConnectionType “AWS” -HypervisorAddress @(“https://<AWS_URL>”) -UserName “APIkey” -Password “Secret key” -Metadata @{ “Citrix_MachineManagement_Options” = $options } -Persist

New-BrokerHypervisorConnection -HypHypervisorConnectionUid $hyp.HypervisorConnectionUid

Note: Replace <AWS_URL> with your own one.

4. Launch Citrix Studio and check hosting connect to verify whether AWS EC2 site has been generated.


  • No Related Posts

Leave a Reply