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 DHCP scopes


In the previous recipe, Installing and authorizing a DHCP server, you installed and authorized a DHCP server. But before that server can begin to provide IP address configuration information to DHCP clients, you need to create a scope and options. The scope is the set of DHCP addresses DHCP can give out, while the options are specific configuration options your DHCP server provides along with an IP address.

Getting ready

Before you can configure DHCP scopes and options, you need to have completed the earlier Installing and authorizing a DHCP server recipe on DC1.

How to do it...

  1. Create a DHCP scope:
Add-DhcpServerV4Scope -Name 'Reskit' `                        -StartRange   10.10.10.150 `                        -EndRange     10.10.10.199 `                        -SubnetMask   255.255.255.0 `                        -ComputerName DC1.Reskit.Org
  1. Get scopes from the server:
Get-DhcpServerv4Scope -ComputerName DC1.Reskit.Org
  1. Set DHCP OptionValues:
Set-DhcpServerV4OptionValue -DnsDomain...