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
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
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
Thanks Tim
Excellent post. Thank you.