Seth Bokelman

View Original

PowerShell script to create numerous DHCP scopes

Let's say you need to create a whole bunch of DHCP scopes in the Windows DHCP server, and you don't feel like spending hours using the wizard, or manually constructing all the netsh commands you need to do it from the command line. I had this very problem last week, so I hacked together this script to take a CSV file with all the details needed for the scopes, and output a .cmd file that I can simply run against my DHCP server to create them all. I've only included the DHCP options for router address, DNS servers, and DNS suffix, but you could certainly add more.

See this content in the original post