Skip to content

Instantly share code, notes, and snippets.

@planetWayne
Last active April 1, 2019 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save planetWayne/8a62d16a1b5357bb3ab03ff05fcbb4a9 to your computer and use it in GitHub Desktop.
Save planetWayne/8a62d16a1b5357bb3ab03ff05fcbb4a9 to your computer and use it in GitHub Desktop.
Get the Parent (host) name of a HyperV Guest
(get-item "hklm:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters").getvalue("hostname")
# To return other info about the host / guest - leave off the .getvalue section
(get-item "hklm:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment