Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Windows Server 2016 Automation with PowerShell Cookbook - Second Edition

You're reading from  Windows Server 2016 Automation with PowerShell Cookbook - Second Edition

Product type Book
Published in Sep 2017
Publisher
ISBN-13 9781787122048
Pages 660 pages
Edition 2nd Edition
Languages
Authors (2):
Thomas Lee Thomas Lee
Profile icon Thomas Lee
 Ed Goad Ed Goad
Profile icon Ed Goad
View More author details

Table of Contents (21) Chapters

Title Page
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. What's New in PowerShell and Windows Server 2. Implementing Nano Server 3. Managing Windows Updates 4. Managing Printers 5. Managing Server Backup 6. Managing Performance 7. Troubleshooting Windows Server 2016 8. Managing Windows Networking Services 9. Managing Network Shares 10. Managing Internet Information Server 11. Managing Hyper-V 12. Managing Azure 13. Using Desired State Configuration

Installing and authorizing a DHCP server


Installing and authorizing a DHCP server is easy and straightforward. You can use the GUI, Server Manager to achieve this. Server Manager, though, is a GUI layered on top of PowerShell. The GUI gathers the details, and PowerShell does the rest. In this recipe, you carry out the installation and basic configuration using just the native cmdlets.

Getting ready

This recipe installs a DHCP server on DC1. You need that system up and running.

How to do it...

  1. Login to DC1, and add the DHCP server feature to your system:
Install-WindowsFeature -Name DHCP `                         -IncludeManagementTools
  1. Add the DHCP server's security groups:
Add-DHCPServerSecurityGroup -Verbose
  1. Let DHCP know it's all configured:
Set-ItemProperty `
         -Path HKLM:\SOFTWARE\Microsoft\ServerManager\Roles\12 `  -Name ConfigurationState `     -Value 2
  1. Authorize the DHCP server in Active Directory:
Add-DhcpServerInDC -DnsName DC1.Reskit.Org
  1. Restart DHCP:
Restart-Service -Name DHCPServer...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime}