Task – When Was The Last Database Backup Run?…

MS Exchange

I know that almost all companies will be using a backup software, cheaper or expensive and it will give you information regarding everything related to the backup. What if you are in a large company and have a dedicated backup team and you don’t have access to any of the backup information?

As an exchange administrator, let’s say that you want to know when the last full backup was run on all your mailbox databases. The task becomes really simple with Powershell. Run

Get-MailboxDatabase –status | fl name, lastfullbackup, lastincrementalbackup

4

You can further target the databases on a particular server with the –server parameter.

Get-MailboxDatabase –Server “server name” –status | fl name, lastfullbackup, lastincrementalbackup

If you have a large number of mailbox servers or want to run it as a scheduled task & have the details emailed to you (I will cover how to use powershell to send emails in a later article), run

Get-ExchangeServer | Where-Object {$_.IsMailboxServer –eq $true} | ForEach-Object { Get-MailboxDatabase –Server $_.Name –Status } | fl name, lastfullbackup, lastincrementalbackup

5

As always, you can export the output to a txt, csv or html file. Run the command below to get the output in an html file.

Get-MailboxDatabase –status | fl name, lastfullbackup, lastincrementalbackup | ConvertTo-Html | Out-File c:backup.html

If you want to launch the html file from powershell itself, run

Invoke-Item c:backup.html

Other Popular Articles


MS Exchange

Scripting Agent Initialization Failed: “File is not found” Error During Exchange 2016 Setup

MS Exchange

EAC Access While Co-Existing Exchange 2013 With 2010

MS Exchange

Delete All Calendar Entries In An Exchange 2010 Mailbox

2 thoughts on “Task – When Was The Last Database Backup Run?…”

Leave a Comment