How-to – Enabling VMware View PCoIP with dynamic IP address


With VMware View 4.5 it was only possible to run PCoIP if there was a direct connection to the connection server or the security server, since a lot of UDP ports have to be open. When connecting to a VMware View 4.5 environment over a HTTPS connection, VMware View would revert to RDP instead of PCoIP.

The new VMware View 4.6 (and in later version) now offers a secure tunnel that can do PCoIP as well without first requiring a VPN connection. Sounds great to me until I learned that this new feature requires a fixed external IP address. At first I thought it probably can also be a dyndns name. Unfortunately, after checking the manual (*) I learned it really has to be an IP address.

When configuring a View Security Server, the one that can sit in the DMZ, you have to set the external address by which the clients will access the server. This hasn’t changed from VMware View 4.5. But now from VMware View 4.6, the external IP has to be set as well.


There is a PowerShell command that change the external IP and port number (default = 4172):

Update-ConnectionBroker -broker_id CS-VSG -externalPCoIPURL

Below a powershell script (from  ) that checks with ‘WhatsMyIP’ to find the external IP address and if this is different from the configured IP it will change the IP. All actions are dumped into a log file.

Add-PSSnapin VMware.VimAutomation.Core
Add-PSSnapin VMware.View.Broker
# Name of the Security Server
$SecurityServer = "W2K8-VIEW"
# For logging creating a timestamp
$TimeStamp = Get-Date -format yyyy-MM-dd-H-mm
# Filling $CheckedIP with the external IP address, using service
$wc = New-Object net.WebClient
$CheckedIP = $wc.downloadstring("")
$CheckedIP = $CheckedIP.Trim()
# Now check the current ExternalPCoIPURL entry
$CurrentSettings = Get-ConnectionBroker
$CurrentIP = $CurrentSettings.externalPCoIPURL
# Check if $CurrentIP starts with the IP address from $CheckedIP
# Used StartsWith because $CurrentIP has port address at the end
$Result = $CurrentIP.StartsWith($CheckedIP)
# Are IP addresses the same?
If ($Result)
     # Yes, both IP addresses are the same, do nothing, only write a log entry
     $row = $TimeStamp + "," + $CheckedIP + "," + $CurrentIP + ",nochange"
    # External IP is not equal to IP set in externalPCoIPURL
    # Changing the externalPCoIPURL
    Update-ConnectionBroker -broker_id "W2K8-VIEW" -externalPCoIPURL $CheckedIP
    # Check if it was succesful
    $NewSettings = Get-ConnectionBroker
    $row = $TimeStamp + "," + $CheckedIP + "," + $CurrentIP + "," + $NewSettings.externalPCoIPURL
$row | Out-File -FilePath "c:\logging\check-ip.log" -Append

 Program to run: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Add argument: c:\logging\ChangeSecurityServerIP-v01.ps1