fix wsus missing functions

This commit is contained in:
Colin Gagnaire 2019-03-22 18:04:56 +01:00
parent 4c70be6515
commit 64376a9bf2
2 changed files with 7 additions and 0 deletions

View File

@ -22,6 +22,7 @@ package centreon::common::powershell::wsus::serverstatistics;
use strict; use strict;
use warnings; use warnings;
use centreon::common::powershell::functions;
sub get_powershell { sub get_powershell {
my (%options) = @_; my (%options) = @_;
@ -32,7 +33,12 @@ sub get_powershell {
my $ps = ' my $ps = '
$culture = new-object "System.Globalization.CultureInfo" "en-us" $culture = new-object "System.Globalization.CultureInfo" "en-us"
[System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture [System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture
';
$ps .= centreon::common::powershell::functions::escape_jsonstring(%options);
$ps .= centreon::common::powershell::functions::convert_to_json(%options);
$ps .= '
$wsusServer = "' . $options{wsus_server} . '" $wsusServer = "' . $options{wsus_server} . '"
$useSsl = ' . $options{use_ssl} . ' $useSsl = ' . $options{use_ssl} . '
$wsusPort = ' . $options{wsus_port} . ' $wsusPort = ' . $options{wsus_port} . '

View File

@ -22,6 +22,7 @@ package centreon::common::powershell::wsus::synchronisationstatus;
use strict; use strict;
use warnings; use warnings;
use centreon::common::powershell::functions;
sub get_powershell { sub get_powershell {
my (%options) = @_; my (%options) = @_;