From c75504d314de3352b6c4973135107af49fe348d6 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 18 Feb 2021 11:08:52 +0100 Subject: [PATCH] fix issue with hyperv --- .../common/powershell/hyperv/2012/nodeintegrationservice.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/centreon-plugins/centreon/common/powershell/hyperv/2012/nodeintegrationservice.pm b/centreon-plugins/centreon/common/powershell/hyperv/2012/nodeintegrationservice.pm index ee501efc0..6fffa5282 100644 --- a/centreon-plugins/centreon/common/powershell/hyperv/2012/nodeintegrationservice.pm +++ b/centreon-plugins/centreon/common/powershell/hyperv/2012/nodeintegrationservice.pm @@ -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];