Creating a daily backup report

When performing backups of a system, one of the most critical components is reporting on the success or failure of the backups. With backup reports, you can prove that the backups are performing properly, resolve problems, identify recurring issues, and determine if the sizing and performance is sufficient for your environment.

In this recipe, we will create a basic backup report that will be sent to an Administrator every day. The report will capture the basic success and failure status for backups of a server.

Getting ready

For this recipe, we will be using a system configured similar to the first recipe, Configuring backup policies.

How to do it...

  1. Define the report.
    $now = Get-Date $startTime = $now.AddDays(-2) $myReport ...

Get Windows Server 2012 Automation with PowerShell Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.