fix issue with hyperv

This commit is contained in:
garnier-quentin 2021-02-18 11:08:52 +01:00
parent 9238b96fbd
commit f25521ce74
1 changed files with 4 additions and 1 deletions

View File

@ -53,7 +53,10 @@ Try {
$item.name = $vm.VMName
$item.state = $vm.State.value__
$item.integration_services_state = $vm.IntegrationServicesState
$item.integration_services_version = $vm.IntegrationServicesVersion.toString()
$item.integration_services_version = $null
if ($null -ne $vm.IntegrationServicesVersion) {
$item.integration_services_version = $vm.IntegrationServicesVersion.toString()
}
$item.note = $note
$services = New-Object System.Collections.Generic.List[Hashtable];