From 5e822533ab505049f5aceb8a12259cf7bf8e11f3 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Fri, 12 Mar 2021 13:59:24 +0100 Subject: [PATCH] fix veeam progressbar --- centreon/common/powershell/veeam/jobstatus.pm | 5 +++-- centreon/common/powershell/veeam/licenses.pm | 6 +++--- centreon/common/powershell/veeam/listjobs.pm | 6 +++--- centreon/common/powershell/veeam/tapejobs.pm | 6 +++--- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/centreon/common/powershell/veeam/jobstatus.pm b/centreon/common/powershell/veeam/jobstatus.pm index c4c939af9..504516254 100644 --- a/centreon/common/powershell/veeam/jobstatus.pm +++ b/centreon/common/powershell/veeam/jobstatus.pm @@ -29,6 +29,9 @@ sub get_powershell { my (%options) = @_; my $ps = ' +$ProgressPreference = "SilentlyContinue" +$WarningPreference = "SilentlyContinue" + $culture = new-object "System.Globalization.CultureInfo" "en-us" [System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture '; @@ -38,8 +41,6 @@ $culture = new-object "System.Globalization.CultureInfo" "en-us" $ps .= centreon::common::powershell::veeam::functions::powershell_init(); $ps .= ' -$ProgressPreference = "SilentlyContinue" -$WarningPreference = "SilentlyContinue" Try { $ErrorActionPreference = "Stop" diff --git a/centreon/common/powershell/veeam/licenses.pm b/centreon/common/powershell/veeam/licenses.pm index 12d2a3341..1b52d630d 100644 --- a/centreon/common/powershell/veeam/licenses.pm +++ b/centreon/common/powershell/veeam/licenses.pm @@ -29,6 +29,9 @@ sub get_powershell { my (%options) = @_; my $ps = ' +$ProgressPreference = "SilentlyContinue" +$WarningPreference = "SilentlyContinue" + $culture = new-object "System.Globalization.CultureInfo" "en-us" [System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture '; @@ -38,9 +41,6 @@ $culture = new-object "System.Globalization.CultureInfo" "en-us" $ps .= centreon::common::powershell::veeam::functions::powershell_init(); $ps .= ' -$ProgressPreference = "SilentlyContinue" -$WarningPreference = "SilentlyContinue" - Try { $ErrorActionPreference = "Stop" diff --git a/centreon/common/powershell/veeam/listjobs.pm b/centreon/common/powershell/veeam/listjobs.pm index 155133889..12fad25ad 100644 --- a/centreon/common/powershell/veeam/listjobs.pm +++ b/centreon/common/powershell/veeam/listjobs.pm @@ -29,6 +29,9 @@ sub get_powershell { my (%options) = @_; my $ps = ' +$ProgressPreference = "SilentlyContinue" +$WarningPreference = "SilentlyContinue" + $culture = new-object "System.Globalization.CultureInfo" "en-us" [System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture '; @@ -38,9 +41,6 @@ $culture = new-object "System.Globalization.CultureInfo" "en-us" $ps .= centreon::common::powershell::veeam::functions::powershell_init(); $ps .= ' -$ProgressPreference = "SilentlyContinue" -$WarningPreference = "SilentlyContinue" - Try { $ErrorActionPreference = "Stop" diff --git a/centreon/common/powershell/veeam/tapejobs.pm b/centreon/common/powershell/veeam/tapejobs.pm index 1d03fb922..9732bc73c 100644 --- a/centreon/common/powershell/veeam/tapejobs.pm +++ b/centreon/common/powershell/veeam/tapejobs.pm @@ -29,6 +29,9 @@ sub get_powershell { my (%options) = @_; my $ps = ' +$ProgressPreference = "SilentlyContinue" +$WarningPreference = "SilentlyContinue" + $culture = new-object "System.Globalization.CultureInfo" "en-us" [System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture '; @@ -38,9 +41,6 @@ $culture = new-object "System.Globalization.CultureInfo" "en-us" $ps .= centreon::common::powershell::veeam::functions::powershell_init(); $ps .= ' -$ProgressPreference = "SilentlyContinue" -$WarningPreference = "SilentlyContinue" - Try { $ErrorActionPreference = "Stop"