I am using VirtualBox and I want to be able to obtain a list of all Virtual Machines using a powershell script (after clicking a button on the gui).
I know you can use the command
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" list vms
in cmd/batch to list all VMs but I can't seem to figure out how to display the output with my powershell script. That is why I wanted to create a new powershell window which executes this command so I have a list of VMs.
I tried doing that but nothing happens at all:
& 'C:\Program Files\Oracle\VirtualBox\VBoxManage.exe' list vms
Thanks in advance.
best regards, John