Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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