Forum Discussion
5 years ago
Alright I moved this over to PropertySource, and for now I am using the Remote Registry method:
$ComputerName = hostname
# Remote Reqistry
$HyperVHost = ([Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$ComputerName)).OpenSubKey('SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters').GetValue('PhysicalHostName')
Write-Host "auto.lmi.PhysicalHost=$(${HyperVHost})"
Exit 0
This is returning what I would expect. Thanks for the help!
Related Content
- 7 months ago
- 8 months ago