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

Reporting on performance data


In the first three recipes in this chapter, you have seen different ways to collect performance information. In this recipe, you create a report on this gathered performance information based on the CSV files output by the data collection process.

Getting ready

This recipe was written to use SRV1. As with any recipe, you can use any server in your infrastructure, but you would need to adjust the details of all steps to reflect the changes you are making. This recipe also used CSV files, as created by the PLA infrastructure. As noted earlier, it is simple and straightforward to adjust the counter output file to be CSV.

Use the recipe Configuring and using Data Collector Sets, change the counter output file to CSV and generate CSV output in the folder C:\PerfLogs\ADMIN.

How to do it...

  1. Import the performance counters:
$Folder = 'C:\PerfLogs\Admin'$File = Get-ChildItem -Path $Folder\*.csv -Recurse
  1. Import the performance counters:
$Counters = Import-Csv -Path $File.FullName...