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

Creating a printer pool


On Windows, a printer pool is a single named printer with two or more print devices (printer ports). Windows sends a given print job to any of the printers in the pool. This feature is very useful in environments where users do a lot of printing and need the speed that additional printers can provide, without having to ask the user to choose which specific print device to use.

There are no PowerShell cmdlets to enable you to create a printer pool. Older printer features—the use of PrintUI.DLL and RunDLL32, which have been features in Windows for several versions. These tools are another example of making use of console applications where you need them.

Getting ready

You run this recipe on the PSRV. Additionally, this recipe assumes you have created the printer, as per the Install and share printers recipe.

How to do it...

  1. Add a new port for this printer:
   Add-PrinterPort -Name Sales_Color2  `                   -PrinterHostAddress   10.10.10.62
  1. Create a printer pool for...