diff --git a/centreon-plugins/centreon/common/powershell/exchange/2010/databases.pm b/centreon-plugins/centreon/common/powershell/exchange/2010/databases.pm index cd7b8b5b0..581b14f5e 100644 --- a/centreon-plugins/centreon/common/powershell/exchange/2010/databases.pm +++ b/centreon-plugins/centreon/common/powershell/exchange/2010/databases.pm @@ -94,7 +94,8 @@ Foreach ($DB in $MountedDB) { if ($no_copystatus == 0) { $ps .= ' # Test CopyStatus - $CopyStatusResult = Get-MailboxDatabaseCopyStatus -Identity $DB.Name + $tmp_name = $DB.Name + "\" + $DB.Server + $CopyStatusResult = Get-MailboxDatabaseCopyStatus -Identity $tmp_name Write-Host "[contentindexstate=" $CopyStatusResult.ContentIndexState "][[contentindexerrormessage=" $CopyStatusResult.ContentIndexErrorMessage "]]" -NoNewline '; } diff --git a/centreon-plugins/centreon/common/powershell/exchange/2010/outlookwebservices.pm b/centreon-plugins/centreon/common/powershell/exchange/2010/outlookwebservices.pm index 52d3a8083..eeda8ab4a 100644 --- a/centreon-plugins/centreon/common/powershell/exchange/2010/outlookwebservices.pm +++ b/centreon-plugins/centreon/common/powershell/exchange/2010/outlookwebservices.pm @@ -37,7 +37,7 @@ sub get_powershell { $ps .= ' try { $ErrorActionPreference = "Stop" - $results = Test-OutlookWebServices -Identity "' . $options{mailbox} . '" + $results = Test-OutlookWebServices -WarningAction:SilentlyContinue -Identity "' . $options{mailbox} . '" } catch { Write-Host $Error[0].Exception exit 1