Skip to content

Instantly share code, notes, and snippets.

@PlagueHO
Last active April 19, 2016 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PlagueHO/2281e18279d78aceb7db283681ebd95b to your computer and use it in GitHub Desktop.
Save PlagueHO/2281e18279d78aceb7db283681ebd95b to your computer and use it in GitHub Desktop.
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