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

Create a daily backup report


Most backup jobs are fire and forget. You set them up, and they run. In such an environment, it is easy to forget about backups until the time when you need them (that is to recover a file, folder or entire server). One thing you can do is to generate a daily report on the state of backup on a critical server. You can run this report early every morning, and email it to one or more people in your organization to notify them of any issues that may have arisen with processing backups on critical servers.

This recipe creates a scheduled task which sends an email containing a summary of backup operations on your server, in this case: you use the file server FS1. This recipe is in two parts: the first part is a simple script that creates a backup report (on FS1) and the used email to send you the backup report. The second part of this recipe sets up the scheduled task that runs the backup report script. This second script also summarizes the results of setting up the...