How to open the VMware Remote Console (application) from the PowerCLI

powerclivmware-vsphere

A recent update to ESXi in our environment added a feature, "Open with VMRC".

Piece of Web Client screen

This works outside the browser, and as the method of accessing the console that functions inside the browser hasn't worked in my Chrome for months, this removal of a dependency is a welcome change.

Is there a way to open the console app from PowerCLI? I have v5.8.
I've looked into Open-VMConsoleWindow, but it seems to be intended to open a browser window.

Is it possible to start this app in some way without mucking about in the vSphere web client?

Best Answer

After more than an hour of searching around and trial-and-error, i followed what Mario Lenz said:

C:\Program Files (x86)\VMware\VMware Remote Console\vmrc.exe vmrc://[USERNAME]@[VC]/?moid=[VM-MOREF-ID]

[VM-MOREF-ID] can be found in the URL, in recent web client versions (i connected to the web client of an ESXI 6.5 vCenter). Open the web client, login and click on a VM. In the URL, at some point there is something like this:

:VirtualMachine:vm-324:

So, create a shortcut on your desktop with the following in Target:

C:\Program Files (x86)\VMware\VMware Remote Console\vmrc.exe vmrc://[USERNAME]@[VC]/?moid="vm-324"

That should do the job. [USERNAME] and [VC] should be replaced with your username and vCenter Server address respectively.

This will ask you for the password of the username specified in the command line. You can omit the "[USERNAME]@" part from the command-line if you wish to be asked for the username every time.