+ Enhance exchange 2010 modes

This commit is contained in:
garnier-quentin 2015-08-24 15:47:44 +02:00
parent 0ff6ae899e
commit 8c0a56da93
2 changed files with 3 additions and 2 deletions

View File

@ -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
';
}

View File

@ -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