From 70f02450c844998da13c35d68b08f9dcf8c55f9e Mon Sep 17 00:00:00 2001 From: qgarnier Date: Wed, 2 Feb 2022 16:00:16 +0100 Subject: [PATCH] add(wsman): powershell chunk management (#3457) --- centreon-plugins/centreon/plugins/wsman.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/centreon-plugins/centreon/plugins/wsman.pm b/centreon-plugins/centreon/plugins/wsman.pm index feed86599..c243a7b46 100644 --- a/centreon-plugins/centreon/plugins/wsman.pm +++ b/centreon-plugins/centreon/plugins/wsman.pm @@ -305,11 +305,11 @@ sub execute_powershell { my ($self, %options) = @_; my $chunk = 8000; - my $filename = $options{label} . '-' . sprintf("%08X", rand(0xFFFFFFFF)) . '.bat'; + my $filename = 'C:/Windows/Temp/' . $options{label} . '-' . sprintf("%08X", rand(0xFFFFFFFF)) . '.bat'; my $commands = [ { label => 'prev1-' . $options{label}, - value => 'if not exist "C:\\temp\\" mkdir C:\\temp' + value => 'if not exist "C:/Windows/Temp/" mkdir C:/Windows/Temp' }, { label => 'prev2-' . $options{label},