How to find the Hyper-V host name of a guest VM

Posted on Updated on

In all of our environments we all know EXACTLY what’s going on, where it’s going on, and where everything is right? Chances are that’s not true, and like most of us, especially in large home-grown development environments there are servers sitting under peoples desks, in some random closets, etc. Here’s an easy way to find out on what Hyper-V host a guest resides.

(get-item “HKLM:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters”).GetValue(“HostName”)

 

Pop that into powershell and you’re good to go!

 

Hope I’ve made your day at least a little bit easiser.

 

Thanks,

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s