Welcome to VirtuallyThatGuy – and today we are going to be looking at how to open the VM console from the PowerCLI or PowerShell. I never really thought about using the open-vmconsolewindow cmdlet until a colleague asked the question during lunch break. I have used it in the past when the cmdlet was first introduced in version 5.5 PowerCLI. This is very useful especially if you spend a lot of time in the CLI.
There are some perquisites and I have listed them below for your information.
*PowerCLI 6.0 or above
*PowerShell Version 4.0 or above
* VMware Remote Console version 8 or above
$vCenters = "ntcp-vc01.lab.local" , "uk3p-vc01.lab.local"
Connect-VIServer $vCenters
## Get VM to verify its part of the specified vCenter
get-vm -Name dtcp-srm01 | select Name, PowerState, NumCpu, MemoryGB, Version, @{N="Cluster";E={Get-Cluster -VM $_}}, VMHost | ft -a
## Now run below command to open the VMRC in fullscreen mode
Open-VMConsoleWindow -VM "dtcp-srm01" -FullScreen # Or use below
Get-VM dtcp-srm01 | Open-VMConsoleWindow -FullScreen
## There's another option using the url where by it gives you a url to copy and paste but you need flash running
Open-VMConsoleWindow -VM "dtcp-srm01" -UrlOnly
vmrc://clone:cst-VCT-52e253e5-7e7e-0a59-6119-4fbcfeafca57--tp-E0-F6-CD-25-E4-A8-2D-97-25-F2-BF-EE-31-DC-0A-DE-22-85-24-86@uk3p-vc01.lab.local:443/?moid=vm-84
Disconnect-VIServer $vCenters
How can i get the web url of console. because currently its returning the VMRC one. but i need web console URL.
Please assist.
VM > Summary > Launch Web Console (HTML5 Version /ui) or the old flash VM > Open Console and change to Webconsole