From a58e9f4432781d7b7737f728bf1d4aa0b2aa308d Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Mon, 9 Sep 2019 17:36:03 +0200 Subject: [PATCH] fix hyperv node-snapshot --- centreon/common/powershell/hyperv/2012/nodesnapshot.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/centreon/common/powershell/hyperv/2012/nodesnapshot.pm b/centreon/common/powershell/hyperv/2012/nodesnapshot.pm index dff913da9..1df81686f 100644 --- a/centreon/common/powershell/hyperv/2012/nodesnapshot.pm +++ b/centreon/common/powershell/hyperv/2012/nodesnapshot.pm @@ -39,9 +39,9 @@ Try { $ErrorActionPreference = "Stop" $vms = Get-VM if ($vms.Length -gt 0) { - $snapshots = Get-VMSnapshot -VMName * + $snapshots = $vms | Get-VMSnapshot } - + Foreach ($vm in $vms) { $i=0 $note = $vm.Notes -replace "\r","" @@ -89,4 +89,4 @@ __END__ Method to get hyper-v informations. -=cut \ No newline at end of file +=cut