VM starts headless from command line


New Member
I am trying to start a Hyper-V VM from a Powershell using the 'start-vm' command. This works fine, except that it starts up headless (i.e. the 'Virtual Machine Connection' window doesn't open up). Is there a way to make this happen?
Yes, it is possible to start a Hyper-V VM from PowerShell in headless mode. To do this, you can use the `-Passthru` parameter with the `Start-VM` cmdlet.

Here's an example of how you can start a VM in headless mode:

$vmName = "YourVMName"
Start-VM -Name $vmName -Passthru

The `Start-VM` cmdlet will return the VM object once it has started. By using the `-Passthru` parameter, the Virtual Machine Connection window will not open, and the VM will be started in headless mode. You can store the returned VM object in a variable and use it to perform additional operations or retrieve information about the VM.

If you don't want to store the VM object, you can simply use the following command:

Start-VM -Name "YourVMName" -Passthru

Note that when starting a VM in headless mode, you won't have any graphical interface to interact with the VM. You can use other methods such as PowerShell Remoting or Remote Desktop Protocol (RDP) to access and manage the VM.
No my issue is that the VM is starting headless and I want a head. So does that mean that it should be starting up with a head by default in this scenario? Any clues as to why it's not?
I don't think vmconnect works automatically or really at all with the Powershell Start-VM command.

You can easily just invoke vmconnect after like this