Book Image

Windows Server 2016 Automation with PowerShell Cookbook - Second Edition

By : Thomas Lee, Ed Goad
Book Image

Windows Server 2016 Automation with PowerShell Cookbook - Second Edition

By: Thomas Lee, Ed Goad

Overview of this book

This book showcases several ways that Windows administrators can use to automate and streamline their job. You'll start with the PowerShell and Windows Server fundamentals, where you'll become well versed with PowerShell and Windows Server features. In the next module, Core Windows Server 2016, you'll implement Nano Server, manage Windows updates, and implement troubleshooting and server inventories. You'll then move on to the Networking module, where you'll manage Windows network services and network shares. The last module covers Azure and DSC, where you will use Azure on PowerShell and DSC to easily maintain Windows servers.
Table of Contents (21 chapters)
Title Page
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Examine the results of a backup


In the previous recipe, you created a basic backup policy that runs a full backup of the C: volume every day at 6:00. This recipe examines the results of the backup and helps you understand the details of the resulting backup.

Getting ready

Before carrying out this recipe, you need to have had a backup job completed. In the recipe Configure and set backup policy, you created a backup job that would run every morning. Thus, you can wait until the day after you set up this daily backup, or you can run a once-off job as shown at the end of that recipe.

How to do it...

The steps for the recipe are as follows:

  1. Retrieve and view the current WSB backup policy:
Get-WBPolicy
  1. View an overview of what is on the target disk:
Get-ChildItem -Path Q: -Recurse -Depth 3 -Directory
  1. View the details of a backup:
$Backup = (Get-ChildItem -Path Q:\WindowsImageBackup\Psrv `
                               -Directory |
                                 Select-Object -First 1).FullName
    ...