Recovery Database Exchange 2010

How to create a “recovery database for exchange 2010”

There is an easy way to create a (recovery) database in Exchange via exchange management shell

photo source: msexchange.org

Create New Database

New-MailboxDatabase -Recovery -Name “Recovery” -Server BE-EXH -EdbFilePath 
“F:\Restore\Recovery.edb” -LogFolderPath “F:\Restore”

Next step is mounting the recovery database

Mount-database Recovery

Confirm database creation and check if this is a recovery database.

get-mailboxdatabase

get-mailbox

Important : Recovery Value has to be “True” for the recovery database.

you can list all mailbox on the this database

get-mailboxstatistics -dababase recovery

Now you can start restoring mailboxes from your backup .

Messagetracking in Exchange 2010 via Powershell

je kan binnen exchange via de gui messagetracking bekijken.

onder toolbox – Message tracking.

persoonlijk vind ik het handiger om dit te doen via powershell / Exchange Management Shell

dit kan via volgen vie verschillende commando’s:

  • Get-MessageTrackingLog -start “10/19/2012 08:00:00” -end “10/19/2012 09:00:00”   (messagetracking tussen 08u00 & 09u00 ‘s ochtends voor alle inkomende/uitgaande mails)
  • Get-MessageTrackingLog -start “10/19/2012 08:00:00” -end “10/19/2012 09:00:00”    -recipient user@domain.eu
     (messagetracking tussen 08u00 & 09u00 ‘s ochtends voor alle inkomende naar ontvanger user@domain.eu)
  • Get-MessageTrackingLog -start “10/19/2012 08:00:00” -end “10/19/2012 09:00:00”    -sender user@domain.eu
     (messagetracking tussen 08u00 & 09u00 ‘s ochtends voor alle uitgaande mails van verzender user@domain.eu)
Je kan dit uiteraard exporteren naar een csv via | export.csv c:\test\export.csv

via dit script kan je in (semi) realtime messagetracking binnen exchange 2010 bekijken.

$tijd= (get-date)
Write-Host Semi-realtimelog viewer:
For(;;)
{
Get-MessageTrackingLog -Start $tijd
$tijd= (get-date)
Start-Sleep-Seconds5

 

List Mailbox sizes in Exchange 2010

list mailbox sizes in exchange 2010 very easy with this simple powershell script.

Get-MailboxStatistics –Server %MAILBOXSERVERNAME% | Sort-Object -Property TotalItemSize -Descending | FT DisplayName,TotalItemSize,ItemCount > C:/temp/output.csv (txt)

this creates a csv or a txt file with 3 columns 

it looks like this:

Display name Item Size total  items
Team4  10.49 KB (10,738 bytes) 4
Team2  10.49 KB (10,738 bytes) 4
Team1  10.49 KB (10,738 bytes) 4
Team5  10.49 KB (10,738 bytes) 4
Team3  10.49 KB (10,738 bytes) 4

 

is you substract > C:/temp/output.csv (txt) the result will be displayed in the powershell command prompt.