Thought I’d share a nice wrapper for netsh and dnscmd calls to allow easy, bulk provisioning of new DHCP scopes. It’s nice being able to provision a ton of these at once by piping the output from Import-CSV!
2 minute read
Thought I’d share a nice wrapper for netsh and dnscmd calls to allow easy, bulk provisioning of new DHCP scopes. It’s nice being able to provision a ton of these at once by piping the output from Import-CSV!
############################
#AUTHOR: JR Morgan
#CREATED: 20120417
#MODIFIED: 20140611
############################
<#
.Synopsis
Adds DHCP Scope to ALL specified DHCP servers. If split-scope is desired
the script uses IP Math to automatically add the desired exlcude ranges.
.Description
Creates a DHCP based on user-provided parameters. For 50/50 split-scope config,
the ordering of the DHCP Servers determines the upper/lower designation. The first
DHCP server specified will host upper scope portion, while the second DHCP server will
host the lower scope portion. Upper/Lower 'tags' are added to the description when using
the Split50 switch.
.Parameter DhcpServer
An array of DHCP Server IP names or addresses that will host the new DHCP scopes
.Parameter IPScope
The desired IP Scope
.Parameter IPMask
The desired IP mask for the scope
.Parameter Description
A brief scope description. Upper/Lower tags will
automatically be added if using the Split50 switch
.Parameter Gateway
The IP address of the router or gateway for this scope (Option 3)
.Parameter Dns
An array of DNS server IP addresses utilized by scope clients (Option 6).
.Parameter Domain
The fully-qualified domain name for scope clients (Option 15)</code></pre>
Preventative maintenance, routine care, and repairs for Kubernetes & OpenShift clusters
I’m a Red Hatter working as a Solutions Architect, formerly a Senior Cloud Success Architect, with a focus on and passion for OpenShift and Ansible. Previous life? Cloud Advanced Technology Lead & Big Data Engineer for Lockheed Martin Space, IT/IS Data Center Manager for Lockheed Martin IS&GS, and Senior Infrastructure Designer/Administrator for the City of Gainesville & City of Alachua.
Learn More© 2021 Live Average . Powered by Hugo
Share this post
Twitter
Google+
Facebook
Reddit
LinkedIn
StumbleUpon
Pinterest
Email