0

On Windows Server 2008 (R1, 32-Bit) I've got that far to create a superscope on the command line via cmd, not PowerShell (yay!) through

netsh dhcp server \\SERVER scope IP.ADD.RE.SS set superscope SUPERSCOPENAME 1

... where IP.ADD.RE.SS is an existing IP-Scope that initially starts the superscope SUPERSCOPENAME and 1 activates it. Adding IP-Addresses to the superscope works the same way through repeating the command with (an)other IP-Address(es).

Question: Is there a way to specify more than one IP-Address at a time when creating a superscope in cmd?

erch
  • 126
  • 10
  • 3
    `via cmd, not PowerShell (yay!)` I like classics as much as the next guy, but your enthusiasm for avoiding the tool you'll need to be an even marginally useful Windows administrator is worrying. – HopelessN00b Jun 24 '14 at 19:00
  • I have to -1 this for consciously *not* using the right tool for the job, without justification. If you can provide a good reason for *not* using powershell, when it can be done in one line, then I'll reverse my downvote. – MDMoore313 Jun 24 '14 at 19:20
  • 1
    @HopelessN00b, BigHomie: My enthusiasm was/is because I achieved this task so far through an older tool for the reason that I want to be able to handle the old(er) tools as well as PowerShell, which... personal reasons. PowerShell is a powerful toolkit, true. But as I'm rather looking for answers than a discussion on what tools to use for what ... no hard feelings ;) I just want to know if, and - if so - how this might be possible – erch Jun 24 '14 at 19:33

1 Answers1

2

Technically no, there isn't a way to do it without first setting the superscope you want to use. Again, as noted by other users, PowerShell really is much more useful in this instance, but if you must use Command Prompt try this:

set superscope MySuperScope 1> (this sets the superscope to use for the rest of your DHCP creating session)

then use your command several times over (for however many IPs/Scopes you want to add)

netsh dhcp server \SERVER scope IP.ADD.RE.SS

Again, it's not EXACTLY what you're looking for, but will save you considerable amounts of time not having to go set the superscope you're working with at the start of each command.

Brad Bouchard
  • 2,527
  • 2
  • 13
  • 22
  • Does *sets the superscope to use for the rest of your DHCP creating session* mean "there can only be one active superscope at a time"? Also: Thanks! That's more like it ;) – erch Jun 24 '14 at 21:03
  • 1
    There can only be one active superscope, but you can easily run my first command and change the active one. Glad I could help. – Brad Bouchard Jun 24 '14 at 21:51