VMware: Generate an URL for a VM Console Session


with PowerCli it is simply possible to generate an direct Link to accessing a VM’s Console without clicking through the whole vSphere Tree.

The anatomy of the URL is

function fGenerateWebfrontendURL([string]$sVM,[string]$sVCenter)
    $oVM=Get-VM $sVM -ErrorAction SilentlyContinue -WarningAction SilentlyContinue
    $oVCenter=Get-VIServer $sVCenter -ErrorAction SilentlyContinue -WarningAction SilentlyContinue
    if($oVM -and $oVCenter)
        return $sURL
    return $null

PS D:\> fGenerateWebfrontendURL myVM myVcenter


Advertisment to support michlstechblog.info

3 thoughts on “VMware: Generate an URL for a VM Console Session”

  1. This does not seem to be working for vcenter6.5. Could you provide url format and ways to generate url for vcenter6.5

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.