IT Guy
asked on
How can I determine what the host server is for a Hyper V guest server operating system?
How can I determine what the host server is for a Hyper V guest server operating system?
I have connected using remote desktop to the Hyper V guest operating system, which is Server 2008 R2.
I need to get the server name of the server that hosts this Hyper V guest operating system.
Is there a way that I can look this information up from within the Hyper V guest operating system or by looking in Active Directory Users and Computers?
I have connected using remote desktop to the Hyper V guest operating system, which is Server 2008 R2.
I need to get the server name of the server that hosts this Hyper V guest operating system.
Is there a way that I can look this information up from within the Hyper V guest operating system or by looking in Active Directory Users and Computers?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
http://social.technet.microsoft.com/wiki/contents/articles/hyper-v-how-to-find-the-host-of-a-vm.aspx
For the power shell script that it mentions, what file extension should this script be saved with?
Function Get-VMHost
{
Param([string]$ComputerNam
$HKLM = [Microsoft.Win32.RegistryK
$key = $HKLM.OpenSubKey("SOFTWARE
if ($key -eq $null)
{
return $null;
}
else
{
return $key.GetValue("HostName");
}
}