Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Re: Script to Import Reservations in DHCP Works on Server 2003 but not on Server 2008

Reply
Thread Tools Display Modes

Re: Script to Import Reservations in DHCP Works on Server 2003 but not on Server 2008

 
 
Pegasus [MVP]
Guest
Posts: n/a

 
      11-21-2009

"Greg H" <> wrote in message
news:ac9692e3-6b55-4836-a34d-...
> We need to import hundreds of DHCP reservations into our DHCP server
> with the IP, name, type, MAC address. We have a script that worked
> with 2003, importing the IP and MAC address but it does not work with
> Windows 2008.
>
> Below is our script. Does anyone have one that works with 2008 or can
> help us modify our existing script?
>
> Thanks.
>
> ----
> Set fso = Wscript.CreateObject
>
> ("Scripting.FileSystemObject")
>
> Set shell = Wscript.CreateObject("Wscript.Shell")
>
> Set ipList=fso.OpenTextFile("c:\ListFile.txt", 1, false)
>
> Do While not ipList.AtEndOfStream
> rLine=Trim(ipList.readLine)
> MAC = Right(rLine, Len(rLine) - InStrRev(rLine, ","))
> IP = Left(rLine, InStrRev(rLine, ",") - 1)
> If not IP = "" or MAC = "" then
> shell.run "netsh dhcp server scope 10.10.0.0 add
>
> reservedip " & IP & " " & MAC, 0, True
>
> End If
> Loop
>
> ----------------


To debug this issue you need to run a command like the one below from the
Command Console, then see what happens:

netsh dhcp server scope 10.10.0.0 add reservedip 10.10.0.55
02-06-1B-DE-FD-FC


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Move WSUS Database From Windows Server 2003 to 2008 Charles Update Services 5 12-07-2011 07:42 PM
Re: Can I do anything with my SBS 2003 server after migrating to SBS 2008? Larry Struckmeyer[SBS-MVP] Windows Small Business Server 0 11-04-2009 12:13 PM
Re: Can I do anything with my SBS 2003 server after migrating to SBS 2008? kj [SBS MVP] Windows Small Business Server 1 11-04-2009 04:41 AM
Windows Server 2003 does not open its own share Rick Clapp Windows Server 1 10-29-2009 04:18 PM
Migrating old 2003 server with Exchange to new 2003 64-bit serverwith Exchange 2008 Willo van der Merwe Server Migration 3 10-24-2009 05:26 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59