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

Deploying shared printers


Traditionally, you used scripting to deploy printers. With this method, you create a logon or startup script and deploy this logon script via Group Policies. When machines start up or users log on, the logon script automatically sets up printers.

Once you have set up a shared printer, such as the shared Sales Group color printer, as shown in this chapter, you can deploy it. There are several ways to automate local client printer deployment, including using PowerShell, WMI, the Printui.dll utility, and the Wscript.Network COM object. All of these methods have been in use for a long time and are quite efficient, although PowerShell is the preferred way, naturally.

Getting ready

To deploy a printer to a client, you first need a client computer system. Our demo lab includes a Windows 10 Enterprise client (SG-CL1), which we use in this recipe. To test this recipe, you need the client computer, the print server (PSVR), and the domain controller (DC1).

Once you create the...