Posted On August 30, 2019

1-Liner to Find Host of Virtual Machine in Hyper-V

kimconnect 0 comments
blog.KimConnect.com >> Codes >> 1-Liner to Find Host of Virtual Machine in Hyper-V
PS C:\Users\testAdmin> (get-item "HKLM:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters").GetValue("HostName")
hyperv01.intranet.kimconnect.com

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Microsoft IIS-7 Application Pools

Why run applications inside Application pools? It's a recommended practice to isolate applications even if…

PowerShell: Check Windows Computers for Specific KB’s

# Check for specific KBs $kbs='KB5010790','KB5010419' $computernames=@('WINDOWS001','WINDOWS002') $regexIP = [regex] "\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" $names=foreach($computername in $computernames){ if($computername…

PowerShell: Obtain Domain Admin Credential

function obtainDomainAdminCredentials{ # Legacy domain binding function function isValidCred($u,$p){ # Get current domain using logged-on…