Skip to content

VirtuallyThatGuy

Anything VMware , PowerCLI, PowerShell, Automation and some Windows

Menu
  • Home
  • PowerCLI
  • VMware
  • Automation
  • Windows
  • About
Menu

How to Open VM (Virtual Machine) Console Using PowerCLI – VirtuallyThatGuy

Posted on April 25, 2018December 6, 2022 by VirtuallyThatGuy

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

 

​​ 

 

2 thoughts on “How to Open VM (Virtual Machine) Console Using PowerCLI – VirtuallyThatGuy”

  1. Amandeep Singh says:
    July 16, 2020 at 7:23 am

    How can i get the web url of console. because currently its returning the VMRC one. but i need web console URL.

    Please assist.

    Reply
    1. VirtuallyThatGuy says:
      August 7, 2020 at 10:07 am

      VM > Summary > Launch Web Console (HTML5 Version /ui) or the old flash VM > Open Console and change to Webconsole

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • vROps: Management Pack Troubleshooting
  • Windows AD {Active Directory} (PowerShell) samples
  • Migrate VMs Between vCentres Using Powershell or PowerCLI
  • Set VM Tools to Update Automatically on VM Reboot using powershell
  • Windows Administrator Must Have Powershell Commands

Recent Comments

  • VirtuallyThatGuy on ESXi 8.x, 7.x, 6.x Service sfcbd-watchdog Not Running / Fails to Start – VirtuallyThatGuy
  • VirtuallyThatGuy on VMware ESXi CLI Cheat Sheet
  • Johan on ESXi 8.x, 7.x, 6.x Service sfcbd-watchdog Not Running / Fails to Start – VirtuallyThatGuy
  • Allen on VMware ESXi CLI Cheat Sheet
  • edward on Cluster Capacity Report for VMs, Cluster, Hosts, vCenter – Using PowerCLI – VirtuallyThatGuy

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017

Categories

  • Automation
  • PowerCLI
  • VMware
  • Windows
© 2023 VirtuallyThatGuy | Powered by Superbs Personal Blog theme