Ir al contenido principal

Entradas

Mostrando las entradas de julio, 2014

Script Powershell para saber un promedio de cantidad de correos y tamaño diario.

# Initialize some variables used for counting and for output $From = Get-Date "15/07/2014" $To = $From.AddDays(1) $TotalOutput = @()   [Int64] $intSent = $intRec = 0 [Int64] $intSentSize = $intRecSize = 0 [String] $strEmails = $null     Do {     # Start building the variable that will hold the information for the day     $obj = new-object PSObject     $obj | add-member -membertype NoteProperty -name "DayOfWeek" -value $($From.DayOfWeek)       $obj | add-member -membertype NoteProperty -name "Date" -value $($From.ToShortDateString())       $intSent = $intRec = 0     (Get-TransportServer) | Get-MessageTrackingLog -ResultSize Unlimited -Start $From -End $To | ForEach {         # Sent E-mails         If ($_.EventId -eq "RECEIVE" -and $_.Source -eq "STOREDRIVER")         {             $intSent++ ...

Powershell para saber sobre que buzones tiene permiso un usuario Exchange 2010

Get-Mailbox | Get-MailboxPermission | where {$_.user.tostring() -eq "usuario_con_permisos" -and $_.IsInherited -eq $false}  | fl Identity,User,AccessRights y para eliminar un permiso: get-mailbox -Identity "nombre_del_buzon" | Remove-MailboxPermission -User usuario_con_permisos_a_remover -AccessRights FullAccess  -InheritanceType All y para eliminar un permiso de denegación: get-mailbox -Identity "nombre_del_buzon" | Remove-MailboxPermission -User usuario_con_permisos_a_remover -AccessRights FullAccess  -Deny -InheritanceType All

Warning durante movimiento de buzon entre diferentes bases de datos en el mismo servidor Exchange 2010

Luego de finalizado el movimiento de buzon este queda en la base de datos de destino pero el proceso muestra el siguiente Warning. Warning: Failed to clean up the source mailbox after the move. Error details: MapiExceptionUnexpectedMailboxState: Unable to delete mailbox. (hr=0x80004005, ec=2634) Ademas en "Disconnected Mailbox" aparecen los buzones que han sido movidos, pero estos no son los buzones activos sino que son los originales en la base de origen que no fueron borrados por completo al finalizar el proceso de movimiento. Justamente lo que indica el mensaje de Warning. La solución es limpiar esta información de buzon de la base de origen manualmente. 1) Debemos listar los buzones que están en esta condición en las bases de Exchange, lo hacemos con el siguiente comando. Get-MailboxDatabase | Get-MailboxStatistics | Where-Object {$_.DisconnectReason -ne $null} | ft  Displayname,DisconnectReason,Database,mailboxGuid -AutoSize Aquí nos mostrara la información...