Greetings! I think I'm close but need a little extra push to get this right.
Throughout this year I will need to create 16-20 DHCP scopes at a time every 4 months or so. I'll be opening 4-5 sites with 4 scopes per site. I've built an Excel workbook with necessary information but I think this can be done slightly easier with calling
a file and getting data from the file but I don't really understand how to do that.
Here is the final cell formula I built out and I'd just need to change the referenced cells so I hit all the scopes.
=CONCAT("Add-DhcpServerv4Scope -ComputerName usdhcp110.leinternal.com -Name ",Sheet1!B2," -ScopeId ",Sheet2!E2," -StartRange ",Sheet2!B2," -EndRange ",Sheet2!C2," -SubnetMask ",Sheet2!D2," -LeaseDuration
2.00:00:00 -type Dhcp -State Active")
After this, I'll need to set scope options for gateway, domain, dns where I plan on basically doing the same thing
Set-DhcpServerv4OptionsValue -ComputerName usdhcp110.domain.com -Router <$GatewayIP> -DnsDomain "domain.com" -DnsServer ("10.175.254.10","10.175.254.11")
Like I said, I don't think this is as efficient as I've seen some scripts where you can call a CSV file and pull data from it but I'm not sure how that works. Are there any resources you can point me to directly to try to comprehend how that works or nudge
me in the right direction if I'm already pretty close? My end goal is to run a script or batch file that brings up a prompt asking for "Name, Octet" and then it builds everything out for me. I don't understand how to get there though. If you're able
to assist, I'll return the favor with BGP, OSPF, EIGRP knowledge... :D
Thanks
mike