Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get an Array of Localized Hyper-V Integration Service Names
function GetIntegrationServiceNames {
[CmdLetBinding()]
param
(
)
$Captions = @()
$Classes = @(
'Msvm_VssComponentSettingData'
'Msvm_ShutdownComponentSettingData'
'Msvm_TimeSyncComponentSettingData'
'Msvm_HeartbeatComponentSettingData'
'Msvm_GuestServiceInterfaceComponentSettingData'
'Msvm_KvpExchangeComponentSettingData'
)
foreach ($Class in $Classes)
{
$Captions += (Get-CimInstance `
-Class $Class `
-Namespace Root\Virtualization\V2 `
-Property Caption | Select-Object -First 1).Caption
} # foreach
# This Integration Service is registered in CIM but are not exposed in Hyper-V
# 'Msvm_RdvComponentSettingData'
return $Captions
} # GetIntegrationServiceNames
GetIntegrationServiceNames
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.