• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Think PowerShell

PowerShell for IT Pros

  • About
    • Who I Am
    • Why I Blog
    • Privacy Policy
  • Resources
    • More PowerShell Sites
    • Post Series Index
  • Get Help
  • Show Search
Hide Search

Networking

Configuring Windows DHCP, Part 3: Creating DHCP Reservations

Aaron Rothstein · Aug 22, 2017 · 2 Comments

A DHCP reservation.
A DHCP reservation.

Need to mix the convenience of DHCP with the consistency of a static IP? Use a DHCP reservation, and create them with PowerShell.

DHCP reservations explained

DHCP empowers us to automatically assign IP addresses to clients while adhering to standardized rules (address space, lease duration, DNS servers, etc). For most clients, we typically don’t care what IP address the client ends up with on any given day, but for other devices consistently connected to the network, there are benefits to having the device get the same IP every time. A prime example that everyone can relate to is a printer. If you have the printer shared through a print server, the print server needs to be able to consistently talk to the printer on a known IP address.

“A DHCP reservation is a permanent IP address assignment. It is a specific IP address within a DHCP scope that is permanently reserved for leased use to a specific DHCP client” (tech-faq.com).

In the previous post we created DHCP scopes. Let’s see how we can use PowerShell to create a DHCP reservation within one of those scopes.

[Read more…] about Configuring Windows DHCP, Part 3: Creating DHCP Reservations

Configuring Windows DHCP, Part 2: Creating DHCP Scopes

Aaron Rothstein · Aug 21, 2017 · Leave a Comment

DHCP Scopes
DHCP Scopes

Use PowerShell to create dynamically assigned ranges of IP addresses using DHCP scopes.

What is a DHCP scope?

Per TechNet, a DHCP scope “is the consecutive range of possible IP addresses that the DHCP server can lease to clients on a subnet. Scopes typically define a single physical subnet on your network to which DHCP services are offered. Scopes are the primary way for the DHCP server to manage distribution and assignment of IP addresses and any related configuration parameters to DHCP clients on the network.”

Let’s say you have three subnets on your local network, 192.168.1.0/24, 192.168.2.0/24, and 192.168.3.0/24. The first subnet, 192.168.1.0/24, is a server and network management subnet where all IPs are statically assigned. For this subnet, you would not need to configure a DHCP scope.

For the other subnets, 192.168.2.0/24 is for your wired clients and 192.168.3.0/24 is for your wireless clients. These clients will connect and disconnect to the network throughout the day and week. For these subnets, you would configure a DHCP scope to handle the automatic assignment of IP address leases to these clients.

[Read more…] about Configuring Windows DHCP, Part 2: Creating DHCP Scopes

Configuring Windows DHCP, Part 1: Installing the DHCP Server Role

Aaron Rothstein · Aug 14, 2017 · Leave a Comment

Use PowerShell to configure a Windows DHCP server, starting with the installation of the DHCP Server role.

Windows DHCP Server and PowerShell

If you are running an Active Directory network with Active Directory integrated DNS, you are likely also running Windows DHCP server for managing the automatic assignment of IP addresses to network clients. This post is the first in a series of how to install and configure a Windows DHCP Server using PowerShell, which will allow you to author a build script ahead of implementation, as well as handle some transitional activities from a previous Windows DHCP server.

A DHCP Server is a good candidate for using Desired State Configuration, and there is a DSC resource for managing a DHCP server, which we will cover at the tail end of this post series. But first we will demonstrate the usage of the various DHCP server related cmdlets. [Read more…] about Configuring Windows DHCP, Part 1: Installing the DHCP Server Role

Use PowerShell to Set Up a Hyper-V Lab

Aaron Rothstein · Oct 11, 2016 · 2 Comments

Hyper-V Manager desktop app
Hyper-V Manager desktop app

A Hyper-V lab for your PowerShell sandbox

When learning and playing with new technology like PowerShell, a lab environment is extremely beneficial. Some of the benefits are:

  • A lab environment can be torn down and and rebuilt as needed.
  • Components can be added to or removed from a lab as needed.
  • Actions that are considered risky to perform in a production environment can be performed safely in a contained lab.

Windows 10 Pro, Enterprise, and Education (as well as Windows 8 Pro and Enterprise) come with the same Hyper-V technology that runs in the datacenter, just waiting to be enabled. Here is how to get it installed and configured using PowerShell.

[Read more…] about Use PowerShell to Set Up a Hyper-V Lab

PowerShell Replacements for ‘ipconfig’ Client DNS Functions

Aaron Rothstein · Feb 29, 2016 · Leave a Comment

Screenshot of ipconfig DNS functions.

The third post in my PowerShell Beginner series, “Daily Tasks, The PowerShell Way“. Use PowerShell to replace ipconfig‘s /registerdns, /displaydns, and /flushdns functions, and use for both local and remote computers.

ipconfig: a longtime member of the IT Pro toolbox

Much like ping, ipconfig was a frequently used command line tool for IT Pros. Whether it was getting assigned IP information, releasing and renewing DHCP leases, or investigating DNS client issues, ipconfig was quick go to troubleshooting tool. However, recent versions of Windows and PowerShell have added easy to use cmdlets to replace some of these functions. This post will take a look at the cmdlets related to the DNS client.

[Read more…] about PowerShell Replacements for ‘ipconfig’ Client DNS Functions

Primary Sidebar

Aaron

Follow

Copyright © 2023 · Monochrome Pro on Genesis Framework · WordPress · Log in