non-GUI connection to local Hyper-V VM without network

Posted by sandro on Server Fault See other posts from Server Fault or by sandro
Published on 2014-06-04T21:19:37Z Indexed on 2014/06/04 21:27 UTC
Read the original article Hit count: 308

I have a virtual machine on Hyper-V manager (Windows 2008 R2) without a network configured on the VM. From a powershell script running on the host Windows server, I would like to query into the OS of that local VM for certain information (i.e. if a given process has finished completion).

I am using codeplex's pshyperv module (https://pshyperv.codeplex.com/) to interact with Hyper-V manager, but the only cmdlet to connect to the vm is 'New-VMConnectSession', which launches a 'vmconnect.exe' connection to the VM. Since vmconnect.exe is essentially RDP, this is not very script-friendly.

From within a host's powershell script, is there any way to send a command to a local virtual machine's OS and receive output, if no network is configured on the VM? (I believe Vmware's 'vmrun' utility has this capability)

Another way to ask this question: Does Hyper-V have a non-GUI-based form of vmconnect.exe?

(PS. Not sure if this was more stackoverflow or serverfault)

© Server Fault or respective owner

Related posts about virtualization

Related posts about powershell