Exchange Server Share

… Information sharing on Exchange Server …

Exchange Powershell Tip #06

Exchange Powershell Tip #06

Did my Exchange 2010 or 2013 Backup completed last night?

I have seen many organizations take Full backup once a week and Incremental on daily basis for many reasons like legal, compliance etc… and keep long term tape retention. It’s important for them to ensure that these backups have been completed successfully. Below cmdlet will quickly list the databases that didn’t go through any successful backup (Full Backup or Incremental Backup) cycle in last one day.

Get-MailboxDatabase -Status | | Where {$_.Recovery -ne $true} | Sort-Object Name | Where{($_.LastFullBackup -lt (Get-Date).AddDays(-1).Date.ToString()) -and ($_.LastIncrementalBackup -lt (Get-Date).AddDays(-1).Date.ToString())} | Select Name, LastFullBackup, LastIncrementalBackup, BackupInProgress

Here is the sample output:

ExShellTip6-Backup

You can use any of below field in this cmdlet depending on your backup method that you are using. If you are using native Windows Backup tool then LastCopyBackup field is more appropriate.

SnapshotLastFullBackup
SnapshotLastIncrementalBackup
SnapshotLastDifferentialBackup
SnapshotLastCopyBackup
LastFullBackup
LastIncrementalBackup
LastDifferentialBackup
LastCopyBackup

You can also change the number of days, just change the number here (Get-Date).AddDays(-X)

==> Get All Exchange Powershell Tips from the Archive Here<==

Advertisements

Written by Amit Tank

May 27, 2016 at 5:00 pm

%d bloggers like this: