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

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

Aaron Rothstein

Configuring Windows DHCP, Part 2: Creating DHCP Scopes

Aaron Rothstein · August 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 · August 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

Create Cortana Audio Files From Text Using PowerShell

Aaron Rothstein · July 17, 2017 · 2 Comments

A WAV file generated from PowerShell.

Use Windows 10’s Text-to-Speech capability and Cortana’s voice to create WAV audio from within a PowerShell script.

Finding a Universal Voice: A Universal Problem

Have you ever called a support line and had to listen to a bunch of different recorded scripts, also known as “prompts”? The prompts may be the voice of a single person or a combination of different people (maybe the original voice left the company). There may be feedback noise on the recording. The speaker may have tripped over a word but decided not to record the prompt over again. Maybe the speaker had a cold one the day of recording. All of these factors can create an inconsistent user experience when interacting with the call prompts. If that weren’t enough, it takes TIME to record prompts manually! The more you have the longer it will take, even if you get every recording right on the first try.

Wouldn’t it be great if there was a way to audio files with a consistent voice, and in an efficient manner? We can, with PowerShell and Windows 10’s Text-to-Speech capability, powered by the .NET class SpeechSynthesizer.

[Read more…] about Create Cortana Audio Files From Text Using PowerShell

Change DNS Servers for Computers with Static IP Addresses

Aaron Rothstein · March 27, 2017 · 8 Comments

DNS Server Settings Screenshot
Update DNS servers using PowerShell.

Easily change DNS servers for computers with static IP addresses using PowerShell. Run locally or remote.

Changing DNS servers

Recently I provisioned new domain controllers as part of a migration from a 2008 R2 Active Directory forest to a 2016 Active Directory forest. Like the existing 2008 R2 domain controllers, the new domain controllers are configured as AD integrated DNS servers and will be the primary and secondary DNS servers used on the internal network.

Changing DNS servers for clients using DHCP is a trivial matter; just update Option 6 for the DHCP scope with the new name server IP addresses and restart the client (or wait until they renew their lease).

However if you are like a lot of environments, you have Windows servers and maybe even workstations configured with static IP addresses and static DNS servers. How can you systematically update these configurations?

[Read more…] about Change DNS Servers for Computers with Static IP Addresses

Use Measure-Command to Test Script Performance

Aaron Rothstein · December 5, 2016 · Leave a Comment

Use Measure-Command to time execution.
Using Measure-Command to measure cmdlet execution time.

Throw away your timestamp calculation snippets for testing script performance in favor of the native PowerShell cmdlet Measure-Command.

[Read more…] about Use Measure-Command to Test Script Performance

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 6
  • Page 7
  • Page 8
  • Page 9
  • Page 10
  • Interim pages omitted …
  • Page 12
  • Go to Next Page »

Primary Sidebar

Aaron

Think PowerShell

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