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

Configuring and using Data Collector Sets


The first two recipes in this chapter used different techniques (Get-Counter and WMI) to retrieve specific counters and counter sets. As you seen, getting a large number of counter values for detailed analysis can be very slow with these mechanisms. These techniques are ideal for retrieving one or two bits of information (CPU utilization for example, or pages/second). If you want to get a larger number of statistics (for example, all of the networking statistics including TCP, UDP, IP, and ICMP) the techniques do not scale well.

A better approach to gathering large number of counters is to use the Data Collector Sets and have Windows do the work for you. To do this, you first create and configure a collector set. When you start the set, Windows starts collecting the data you have configured the collector set to return. Finally, when the collection has been completed, you use Performance Monitor to view the results.

This approach is very much easier...