How do I open the VMware Remote Console (application) from the PowerCLI?

Solution 1:

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.

Solution 2:

I didn't have a look at VMRC yet and I'm no PowerCLI expert, but it looks like you can open a console like this:

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

or

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

source

You should be able to get the Managed Object Reference ID of the VM (moid / VM-MOREF-ID) via PowerCLI somehow and then start vmrc.exe. Maybe you can even get your vCenter ticket and use the second way without needing to provide username and password.