4

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?

4 Answers 4

5

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.

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.

1
  • 2
    +1. Omitting [USERNAME@] from the first example, vmrc seems to prompt for credentials. This is handy for emailing the the URLs to multiple recipients, for example.
    – noam
    Jul 25, 2017 at 19:50
1

EDIT: PowerCLI 6.5, announced on the PowerCLI blog 2016-11-17, installs VMRC and launches it with the Open-VMConsoleWindow command, ex.

Get-VM -Name *VM-name* | Open-VMConsoleWindow

Tunsworthy has posted the PowerCLI script Open-VMConsole on GitHub to launch standalone VMRC.

1

You can click on the VM in Vcenter. Right click and go down to console. Launch Remote Console. It will call vmrc.exe for you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .