Last active
April 1, 2019 15:25
-
-
Save planetWayne/8a62d16a1b5357bb3ab03ff05fcbb4a9 to your computer and use it in GitHub Desktop.
Get the Parent (host) name of a HyperV Guest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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