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