Issue :
When you are working on the VM remotely, Sometimes, you need to know on which Hyper-V server your VM currently hosted. It could be wasting a time if you have too many Hyper-V server or Hyper-V Cluster.
In this article, I will show you how to find the Hyper-V server name from the inside of the VM guest.
Resolution:
Basically, the information of the Hyper-V hostname is stored on the Windows Registry on the following path:
HKLM\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters
We will use Get-Item CmdLet to get the information faster. Below is the complete command to get the information.
Get-Item "HKLM:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters"
![Get-Item Hyper-V Host](https://i0.wp.com/www.msnoob.com/wp-content/uploads/2019/03/get-item.png?resize=696%2C257&ssl=1)
As you can see in the image above, there are some values on the registry. Now we need to get only the HostName Value. Below the command to do that.
(get-item "HKLM:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters").GetValue("HostName")
![get-item Hyper-V Host property](https://i0.wp.com/www.msnoob.com/wp-content/uploads/2019/03/get-item-property.png?resize=696%2C75&ssl=1)
If you like this article, please share, subscribe or you can follow our Facebook Page and Twitter.
amazing site! really helpful!
nicee… 🙂