logo资料库

Windows Server 2016 Automation with PowerShell Cookbook(2nd) 无水印....pdf

第1页 / 共650页
第2页 / 共650页
第3页 / 共650页
第4页 / 共650页
第5页 / 共650页
第6页 / 共650页
第7页 / 共650页
第8页 / 共650页
资料共650页,剩余部分请下载后查看
Cover
Copyright
About the Author
Table of Contents
Preface
1: What's New in PowerShell and Windows Server
Introduction
Exploring Remote Server Administration Tools (RSAT)
How to do it...
How it works...
There's more...
Discovering new cmdlets in PowerShell 4 and Windows Server 2012 R2
New cmdlets
How to do it...
How it works...
There's more...
Discovering new cmdlets in PowerShell 5/5.1 and Windows Server 2016
Getting ready
PowerShellGet module
PackageManagement module
Microsoft.PowerShell.Archive module
Microsoft.PowerShell.Utility module
Other new modules
Other new cmdlets
How to do it...
How it works...
There's more...
Exploring PowerShellGet
How to do it...
How it works...
There's more...
Exploring PackageManagement
How to do it...
How it works...
There's more...
Creating an internal PowerShell repository
How to do it...
How it works...
There's more...
2: Implementing Nano Server
Introduction
Deploying a Nano Server in a VM
Getting ready
How to do it...
How it works...
There's more...
Connecting to and managing a Nano Server
Getting ready
How to do it...
How it works...
There's more...
Installing features with Nano Server packages
Getting ready
How to do it...
How it works...
There's more...
3: Managing Windows Updates
Introduction
Installing Windows Server Update Services
Getting ready
How to do it...
How it works...
There's more...
Configuring WSUS update synchronization
Getting ready
How to do it...
How it works...
There's more...
Configuring the Windows Update client
Getting ready
How to do it...
How it works...
There's more...
Creating computer target groups
Getting ready
How to do it...
How it works...
There's more...
Configuring WSUS auto-approvals
Getting ready
How to do it...
How it works...
There's more...
Managing updates
Getting ready
How to do it...
How it works...
There's more...
4: Managing Printers
Introduction
Installing and sharing printers
Getting ready
How to do it...
How it works...
Publishing a printer
Getting ready
How to do it...
How it works...
There's more...
Changing the spool directory
Getting ready
How to do it...
How it works...
Changing printer drivers
Getting ready
How to do it...
How it works...
Printing a test page on a printer
Getting ready
How to do it...
How it works...
Reporting on printer security
Getting ready
How to do it...
How it works...
Modifying printer security
Getting ready
How to do it...
How it works...
Deploying shared printers
Getting ready
How to do it...
How it works...
There's more...
Enabling Branch Office Direct Printing
Getting ready
How to do it...
How it works...
There's more...
Creating a printer pool
Getting ready
How to do it...
How it works...
Reporting on printer usage
Getting ready
How to do it...
How it works...
There's more...
5: Managing Server Backup
Introduction
Configure and set backup policy
Getting ready
How to do it...
How it works...
There's more...
Examine the results of a backup
Getting ready
How to do it...
How it works...
There's more...
Initiate a backup manually
Getting ready
How to do it...
How it works...
There's more...
Restore files and folders
Getting ready
How to do it...
How it works...
There's more...
Backup and restore a Hyper-V Virtual Machine
Getting ready
How to do it...
How it works...
There's more...
Backup and perform bare metal recovery
Getting ready
How to do it...
How it works...
There's more...
Restore the registry from a backup
Getting ready
How to do it...
How it works...
There's more...
Create a daily backup report
Getting ready
How to do it...
How it works...
There's more...
Backup and restore using Microsoft Azure
Getting ready
How to do it...
How it works...
There's more...
6: Managing Performance
Introduction
Explore performance counters with Get-Counter
Getting ready
How to do it...
How it works...
There's more...
Explore performance counters using CIM cmdlets
Getting ready
How to do it...
How it works...
There's more...
Configuring and using Data Collector Sets
Getting ready
How to do it...
How it works...
There's more...
Reporting on performance data
Getting ready
How to do it...
How it works...
There's more...
Generating performance monitoring graph
Getting ready
How to do it...
How it works...
There's more...
Creating a system diagnostics report
Getting ready
How to do it...
How it works...
There's more...
7: Troubleshooting Windows Server 2016
Introduction
Checking network connectivity
Getting ready
How to do it...
How it works...
There's more...
Using troubleshooting packs
Getting ready
How to do it...
How it works...
There's more...
Use best practice analyzer
Getting ready
How to do it...
How it works...
There's more...
Managing event logs
Getting ready
How to do it...
How it works...
There's more...
Forward event logs to a central server
Getting ready
How to do it...
How it works...
There's more...
8: Managing Windows Networking Services
Introduction
New ways to do old things
Getting ready
How to do it...
How it works...
There's more...
Configuring IP addressing
Getting ready
How to do it...
How it works...
There's more...
Converting IP address from static to DHCP
Getting ready
How to do it...
How it works...
There's more...
Installing domain controllers and DNS
Getting ready
How to do it...
How it works...
There's more...
Configuring zones and resource records in DNS
Getting ready
How to do it...
How it works...
There's more...
Installing and authorizing a DHCP server
Getting ready
How to do it...
How it works...
There's more...
Configuring DHCP scopes
Getting ready
How to do it...
How it works...
There's more...
Configuring DHCP server failover and load balancing
Getting ready
How to do it...
How it works...
There's more...
Building a public key infrastructure
Getting ready
How to do it...
How it works...
There's more...
Creating and managing AD users, groups, and computers
Getting ready
How to do it...
How it works...
There's more...
Adding users to AD using a CSV file
Getting ready
How to do it...
How it works...
There's more...
Reporting on AD users
Getting ready
How to do it...
How it works...
There's more...
Finding expired computers in AD
Getting ready
How to do it...
How it works...
There's more...
Creating a privileged user report
Getting ready
How to do it...
How it works...
There's more...
9: Managing Network Shares
Introduction
Securing your SMB file server
Getting ready
How to do it...
How it works...
There's more...
Creating and securing SMB shares
Getting ready
How to do it...
How it works...
There's more...
Accessing SMB shares
Getting ready
How to do it...
How it works...
There's more...
Creating an iSCSI target
Getting ready
How to do it...
How it works...
There's more...
Using an iSCSI target
Getting ready
How to do it...
How it works...
There's more...
Creating a scale-out SMB file server
Getting ready
How to do it...
How it works...
There's more...
Configuring a DFS Namespace
Getting ready
How to do it...
How it works...
There's more...
Configuring DFS Replication
Getting Ready
How to do it...
How it works...
There's more...
10: Managing Internet Information Server
Introduction
Installing IIS
Getting ready
How to do it...
How it works...
There's more...
Configuring IIS for SSL
Getting ready
How to do it...
How it works...
There's more...
Managing TLS cipher suites
Getting ready
How to do it...
How it works...
There's more...
Configuring a central certificate store
Getting ready
How to do it...
How it works...
Configuring IIS bindings
Getting ready
How to do it...
How it works...
There's more ...
Configuring IIS logging and log files
Getting ready
How to do it...
How it works...
There's more...
Managing applications and application pools
Getting ready
How to do it...
How it works...
There's more...
Managing and monitoring network load balancing
Getting ready
How to do it...
How it works...
There's more...
11: Managing Hyper-V
Introduction
Installing and configuring Hyper-V feature
Getting ready
How to do it...
How it works...
There's more...
Using Windows PowerShell Direct
Getting ready
How to do it...
How it works...
There's more...
Securing Hyper-V host
Getting ready
How to do it...
How it works...
There's more...
Create a virtual machine
Getting ready
How to do it...
How it works...
There's more...
Configuring VM hardware
Getting ready
How to do it...
How it works...
There's more...
Configuring Hyper-V networking
Getting ready
How to do it...
How it works...
There's more...
Implementing nested Hyper-V
Getting ready
How to do it...
How it works...
There's more...
Managing VM state
Getting ready
How to do it...
How it works...
There's more...
Configuring VM and storage movement
Getting ready
How to do it...
How it works...
There's more...
Configuring VM replication
Getting ready
How to do it...
How it works...
There's more...
Managing VM checkpoints
Getting ready
How to do it...
How it works...
There's more...
Monitoring Hyper-V utilization and performance
Getting ready
How to do it...
How it works...
There's more...
Creating a Hyper-V health report
Getting ready
How to do it...
How it works...
There's more...
12: Managing Azure
Introduction
Using PowerShell with Azure
Getting ready
How to do it...
How it works...
There's more...
Creating Core Azure Resources
Getting Ready
How to do it...
How it works...
There's more...
Exploring your storage account
Getting ready
How to do it...
How it works...
There's more...
Creating Azure an SMB File Share
Getting ready
How to do it...
How it works...
There's more...
Creating and using websites
Getting ready
How to do it...
How it works...
There's more...
Creating and using Azure virtual machines
Getting ready
How to do it...
How it works...
There's more...
13: Using Desired State Configuration
Introduction
Using DSC and built-in resources
Getting ready
How to do it...
How it works...
There's more...
Parameterizing DSC configuration
Getting ready
How to do it...
How it works...
There's more...
Finding and installing DSC resources
Getting ready
How to do it...
How it works...
There's more...
Using DSC with PSGallery resources
Getting ready
How to do it...
How it works...
There's more...
Configuring Local Configuration Manager
Getting ready
How to do it...
How it works...
There's more...
Implementing a SMB pull server
Getting ready
How to do it...
How it works...
There's more...
Implementing a DSC web-based pull server
Getting ready
How to do it...
How it works...
There's more...
Using DSC partial configurations
Getting ready
How to do it...
How it works...
There's more...
Index
Windows Server 2016 Automation with PowerShell Cookbook Second Edition Automate manual administrative tasks with ease Thomas Lee BIRMINGHAM - MUMBAI
Windows Server 2016 Automation with PowerShell Cookbook Second Edition Copyright © 2017 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: October 2015 Second edition: September 2017 Production reference: 1190917 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78712-204-8 www.packtpub.com
Credits Author Thomas Lee Copy Editors Safis Editing Juliana Nair Reviewer Mike F Robbins Project Coordinator Judie Jose Acquisition Editor Meeta Rajani Proofreader Safis Editing Content Development Editor Abhishek Jadhav Indexer Aishwarya Gangawane Technical Editor Mohd Riyan Khan Graphics Kirk D'Penha Production Coordinator Aparna Bhagat
About the Author Thomas Lee is a consultant/trainer/writer from England and has been in the IT business since the late 1960's. After graduating from Carnegie Mellon University, Thomas joined ComShare where he was a systems programmer building the Commander II time-sharing operating system, a forerunner of today's Cloud computing paradigm. He moved to Comshare UK in 1975 and later went to work for ICL, again developing operating systems. After a sabbatical in 1980/81, he joined Arthur Andersen Management Consultants (now known as Accenture). He left in 1988 to run his own consulting and training business, which is still active today. Thomas holds numerous Microsoft certifications, including MCSE (one of the first in the world) and later versions, MCT (22 years), and was awarded Microsoft's MVP award 17 times. He is also a Fellow of the British Computer Society. He has written extensively for the UK trade press, including PC Pro. Today, Thomas writes and talks mainly on PowerShell and Azure. He currently works for a number of clients to deliver training and to build training courses. Having traveled the world, he entered semi-retirement in 2016 and is spending more time at his cottage in the English countryside, along with his wife, Susan, and their daughter, Rebecca. He continues to give back to the community and spends a lot of time as group administrator for the PowerShell forum on Spiceworks, where he is also a Moderator.
Acknowledgment I’d first like to thank Jeffrey Snover of Microsoft for the invention of PowerShell. I was lucky enough to be in the room the very first time he presented what was then called Monad. His enthusiasm was infectious, and 15 years later I am still excited. Also, a shout out to the author of the first edition, Ed Goad. His first edition was a great base to work on although all the recipes in this edition are reworked totally. A huge thank you has to go to the Packt team: Meeta Rajani, Abhishek Jadhav, Mohd Riyan Khan, and Judie Jose. You guys did a great job getting this book out of the door and dealing with the crises that arose during the writing. And thanks too to our most excellent tech reviewer Mike Robbins. Your reviews were always excellent. When I began this project, I had a co-author, David Cobb. Sadly, for personal reasons, he had to drop out, but I thank him for the chapters he was able to write. We had a large number of volunteer reviewers who read through the various chapters. I appreciate all the work you folks did to try to make this a better book. As each recipe evolved, I would sometimes hit problems. I got a lot of help from the Spiceworks community. Their PowerShell forum is a great source of information and encouragement. If you have problems with PowerShell, this is a great place to get a solution. And finally, I have to thank my wonderful wife, Susan. She has been patient as things progressed, she put up with my bad moods when progress was not as smooth as desirable, and kept me sane when all around me was craziness.
About the Reviewer Mike F. Robbins is a Microsoft MVP on Windows PowerShell and a SAPIEN Technologies MVP. He is a co-author of Windows PowerShell TFM 4th Edition and is a contributing author of a chapter in the PowerShell Deep Dives book. Mike has written guest blog articles for the Hey, Scripting Guy! blog, PowerShell Magazine, and PowerShell.org. He is the winner of the advanced category in the 2013 PowerShell Scripting Games. Mike is also the leader and co-founder of the Mississippi PowerShell User Group. He blogs at mikefrobbins.com and can be found on Twitter at @mikefrobbins.
www.PacktPub.com For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.comand as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. https://www.packtpub.com/mapt Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career. Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser
分享到:
收藏