Closed EUCweb closed 6 years ago
XenServer: DisplayName: XenServer Agent ServiceName: xenagent
VMware: DisplayName: VMware Tools ServiceName: vmtools
Hyper-V DisplayName: Hyper-V Guest Service Interface ServiceName: vmicguestinterface
AHV: DisplayName: Nutanix Guest Tools Agent ServiceName: Nutanix Guest Agent
Function Get-Hypervisor { <# .SYNOPSIS Get the installed Hypervisor like XenServer, VMware, Hyper-V, Nutanix AHV
use get-help <functionname> -full to see full help
.EXAMPLE
Get-BISFHypervisor
.Inputs
.Outputs
.NOTES
Author: Matthias Schlimm
Company: EUCweb.com
History
Last Change: 26.03.2018 MS: Script created
.Link
#
$svc = Test-BISFService -ServiceName "xenagent" -ProductName "XenServer Tools"
$HV="XenServer"
$svc = Test-BISFService -ServiceName "vmtools" -ProductName "VMware Tools"
$HV="VMware"
$svc = Test-BISFService -ServiceName "vmicguestinterface" -ProductName "Hyper-V Guest Service Interface"
$HV="Hyper-V"
$svc = Test-BISFService -ServiceName "Nutanix Guest Agent" -ProductName "Nutanix Guest Tools"
$HV="AHV"
IF ($svc) { return $HV } ELSE { Write-BISFLog -Msg "No supported Hypervisor Tools installed, maybe BIS-F is running on hardware" -ShowConsole -Type W $return $false }
From @matthias-schimm on March 12, 2018 20:28
add a central function to get back the installed Hypervisortools and the version of it
Copied from original issue: EUCweb/BIS-F#15