"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
|