Contributor
Contributor

vSphere 6.0 Power CLI Console Options

Good Morning!

Recently, I have found myself becoming more comfortable with controlling my VMs with the command line in vSphere version 6.0. I am working on a "zero-touch" provisioning option for the types VMs that I currently support within the ecosystem, but for something that may require pre-provisioning I currently need access tthe VM via the console. Typically I do this through the "console" tab in the vSphere Client GUI, but in a perfect world I would like to produce a VM, pre-provision it, and provide the user with instant access via their own SSH terminal once the device has been made available to them. Is there any documentation or guidance that anyone could provide to assist in this task? The pre-provisioning portion of the script is already complete, I just need to establish the steps in which I create the VM, and then access it via the device running the script.

Thank you so much in advance!

0 Kudos
2 Replies
Leadership
Leadership

When you have VMRC installed (the Remote Console), you can use the Open-VMConsoleWindow cmdlet to open a session.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Expert
Expert

does it have to be SSH access?

here is a link to generate a web url (not a local link) to the vm.

Invoke-Automation/GetConsole.ps1 at master · jpsider/Invoke-Automation · GitHub

0 Kudos