VMware PowerCLI

The Best User Interface for your VMware Datacenter!

Update 'Open-VMConsoleWindow -UrlOnly' option to provide an actual URL not UNC path

Often when working with co-workers it would be helpful to be able to provide a web url to them, vs. a UNC path that might be different on their machine. Additionally I often will post a url to a vm in a web app that I am using as third party access. 

I propose that you change the current behavior and add 'UNCPath' or add an addtional option for a 'WebUrl'.

Command: Open-VMConsoleWindow -VM $vm -UrlOnly

Result:

vmrc://clone:cst-VCT-522e3248-1b44-6c41-4a8c-7d561e9d1f97--tp-B9-A6-19-C3-54-5F-34-4F-FF-06-99-29-74-0A-CD-70-AA-82-74-96@{vcenter}:443/?moid=vm-286

This is a sample line I use to build up my own webUrl in powershell (Each version of vSphere is slightly different):

https://$($Vcenter):$($ConsolePort)/vsphere-client/webconsole.html?vmId=$($VMMoRef)&vmName=$($myVM.Name)&serverGuid=${UUID}&host=$($AdvancedSettingsFQDN)&sessionTicket=$($Session)&thumbprint=$thumbprint

Let me know if I can provide more details.

  • Justin Sider
  • May 8 2018
  • Attach files