Hi,
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
https://%vCenterFQDN%:9443/vsphere-client/vmrc/vmrc.jsp?vm=urn:vmomi:VirtualMachine:%MoRef%:%vCenterUUID%
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) { $sURL="https://"+$sVCenterHost+":9443/vsphere-client/vmrc/vmrc.jsp?vm=urn:vmomi:VirtualMachine:"+($oNewVM.ExtensionData.MoRef.Value)+":"+$oVCenter.InstanceUuid.ToUpper() return $sURL } return $null } PS D:\> fGenerateWebfrontendURL myVM myVcenter
Michael
Advertisment to support michlstechblog.info
This does not seem to be working for vcenter6.5. Could you provide url format and ways to generate url for vcenter6.5
Hi,
unfortunately I havn’t a running 6.5 instance here.
Michael
Thanks for reply… pls do update if u get a chance to work on 6.5…