Windows Server 2016 Automation with PowerShell Cookbook - Second Edition

Book description

Over 100 recipes to help you leverage PowerShell to automate Windows Server 2016 manual tasks

About This Book

  • Automate Windows server tasks with the powerful features of the PowerShell Language
  • Master new features such as DevOps, containers, and Nano servers, and speed up their performance using PowerShell
  • Improve PowerShell's usability, and control and manage Windows-based environments by working through inviting recipes

Who This Book Is For

If you are a systems administrator, engineer, or an architect working with Windows Server 2016 and want to automate tasks with PowerShell, then this book is for you. A basic knowledge of PowerShell is expected.

What You Will Learn

  • Streamline routine administration processes
  • Improve the performance and storage of your Windows server with enhanced large-scale PowerShell scripts
  • Use DSC to leverage Windows server features
  • Generate automatic reports that highlight unexpected changes in your environment
  • Monitor performance and report on system utilization using detailed graphs and analysis
  • Create and manage a reliable and redundant Hyper-V environment
  • Manage your enterprise's patch level
  • Utilize multiple tools and protocols to manage your environment

In Detail

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.

Style and approach

This is a practical guide packed with attractive recipes to help you effectively use PowerShell to accelerate your daily administrative tasks with Windows server.

Table of contents

  1. Preface
    1. What this book covers
    2. What you need for this book
    3. Who this book is for
    4. Getting the most from this book
    5. Sections
      1. Chapter and Recipe Headings
      2. Getting ready
      3. How to do it...
      4. How it works...
      5. There's more...
    6. Conventions
    7. Reader feedback
    8. Customer support
      1. Downloading the color images of this book
      2. Errata
      3. Piracy
      4. Questions
      5. Help and assistance
  2. What's New in PowerShell and Windows Server
    1. Introduction
    2. Exploring Remote Server Administration Tools (RSAT)
      1. How to do it...
      2. How it works...
      3. There's more...
    3. Discovering new cmdlets in PowerShell 4 and Windows Server 2012 R2
      1. New cmdlets
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Discovering new cmdlets in PowerShell 5/5.1 and Windows Server 2016
      1. Getting ready
        1. PowerShellGet module
        2. PackageManagement module
        3. Microsoft.PowerShell.Archive module
        4. Microsoft.PowerShell.Utility module
        5. Other new modules
        6. Other new cmdlets
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Exploring PowerShellGet
      1. How to do it...
      2. How it works...
      3. There's more...
    6. Exploring PackageManagement
      1. How to do it...
      2. How it works...
      3. There's more...
    7. Creating an internal PowerShell repository
      1. How to do it...
      2. How it works...
      3. There's more...
  3. Implementing Nano Server
    1. Introduction
    2. Deploying a Nano Server in a VM
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Connecting to and managing a Nano Server
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Installing features with Nano Server packages
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  4. Managing Windows Updates
    1. Introduction
    2. Installing Windows Server Update Services
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Configuring WSUS update synchronization
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Configuring the Windows Update client
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Creating computer target groups
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Configuring WSUS auto-approvals
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Managing updates
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  5. Managing Printers
    1. Introduction
    2. Installing and sharing printers
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Publishing a printer
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Changing the spool directory
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Changing printer drivers
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. Printing a test page on a printer
      1. Getting ready
      2. How to do it...
      3. How it works...
    7. Reporting on printer security
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Modifying printer security
      1. Getting ready
      2. How to do it...
      3. How it works...
    9. Deploying shared printers
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    10. Enabling Branch Office Direct Printing
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    11. Creating a printer pool
      1. Getting ready
      2. How to do it...
      3. How it works...
    12. Reporting on printer usage
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  6. Managing Server Backup
    1. Introduction
    2. Configure and set backup policy
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Examine the results of a backup
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Initiate a backup manually
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Restore files and folders
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Backup and restore a Hyper-V Virtual Machine
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Backup and perform bare metal recovery
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Restore the registry from a backup
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Create a daily backup report
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    10. Backup and restore using Microsoft Azure
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  7. Managing Performance
    1. Introduction
    2. Explore performance counters with Get-Counter
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Explore performance counters using CIM cmdlets
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Configuring and using Data Collector Sets
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Reporting on performance data
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Generating performance monitoring graph
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Creating a system diagnostics report
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  8. Troubleshooting Windows Server 2016
    1. Introduction
    2. Checking network connectivity
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Using troubleshooting packs
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Use best practice analyzer
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Managing event logs
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Forward event logs to a central server
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  9. Managing Windows Networking Services
    1. Introduction
    2. New ways to do old things
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Configuring IP addressing
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Converting IP address from static to DHCP
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Installing domain controllers and DNS
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Configuring zones and resource records in DNS
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Installing and authorizing a DHCP server
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Configuring DHCP scopes
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Configuring DHCP server failover and load balancing
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    10. Building a public key infrastructure
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    11. Creating and managing AD users, groups, and computers
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    12. Adding users to AD using a CSV file
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    13. Reporting on AD users
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    14. Finding expired computers in AD
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    15. Creating a privileged user report
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  10. Managing Network Shares
    1. Introduction
    2. Securing your SMB file server
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Creating and securing SMB shares
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Accessing SMB shares
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Creating an iSCSI target
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Using an iSCSI target
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Creating a scale-out SMB file server
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Configuring a DFS Namespace
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Configuring DFS Replication
      1. Getting Ready
      2. How to do it...
      3. How it works...
      4. There's more...
  11. Managing Internet Information Server
    1. Introduction
    2. Installing IIS
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Configuring IIS for SSL
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Managing TLS cipher suites
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Configuring a central certificate store
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. Configuring IIS bindings
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more ...
    7. Configuring IIS logging and log files
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Managing applications and application pools
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Managing and monitoring network load balancing
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  12. Managing Hyper-V
    1. Introduction
    2. Installing and configuring Hyper-V feature
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Using Windows PowerShell Direct
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Securing Hyper-V host
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Create a virtual machine
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Configuring VM hardware
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Configuring Hyper-V networking
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Implementing nested Hyper-V
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Managing VM state
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    10. Configuring VM and storage movement
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    11. Configuring VM replication
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    12. Managing VM checkpoints
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    13. Monitoring Hyper-V utilization and performance
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    14. Creating a Hyper-V health report
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  13. Managing Azure
    1. Introduction
    2. Using PowerShell with Azure
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Creating Core Azure Resources
      1. Getting Ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Exploring your storage account
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Creating Azure an SMB File Share
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Creating and using websites
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Creating and using Azure virtual machines
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  14. Using Desired State Configuration
    1. Introduction
    2. Using DSC and built-in resources
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Parameterizing DSC configuration
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Finding and installing DSC resources
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Using DSC with PSGallery resources
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Configuring Local Configuration Manager
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Implementing a SMB pull server
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Implementing a DSC web-based pull server
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Using DSC partial configurations
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...

Product information

  • Title: Windows Server 2016 Automation with PowerShell Cookbook - Second Edition
  • Author(s): Thomas Lee
  • Release date: September 2017
  • Publisher(s): Packt Publishing
  • ISBN: 9781787122048