在Hyper-V Guest取得Hyper-V host是哪一台的PowerShell command

  • 1195
  • 0

在Hyper-V Guest取得Hyper-V host是哪一台的PowerShell command

同事問了很多次了,Memo一下,下次方便查詢

 

(get-item "HKLM:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters").GetValue("HostName")