Re: DHCP and VBScripting

Tech-Archive recommends: Fix windows errors by optimizing your registry




I've used dhcpobjs.dll for this in the past, it was very simple. I think
it's in the Windows 2000 Server Resource Kit tools, but I'm not sure. I
have VB code I could share with you, but not VBScript.

You could also try netsh.exe, I think it will do what you want. You might
need to add the DHCP helper like this:

C:\>netsh.exe
netsh>add helper dhcpmon.dll
Ok.

netsh>dhcp
netsh dhcp>?
list - Lists all the commands available.
dump - Dumps configuration to a text file.
help - Displays help.
? - Displays help.
add - Adds a configuration entry to a table.
delete - Deletes a configuration entry from a table.
show - Displays information.
server [\\servername/ipaddress] - To switch the context to the server
specified.
A Null implies the local machine.


netsh dhcp>server 10.10.10.1
netsh dhcp server>?
list - Lists all the commands available.
dump - Dumps configuration to a text file.
help - Displays help.
? - Displays help.
add - Adds a configuration entry to a table.
delete - Deletes a configuration entry from a table.
export - Exports the configuration to a file.
import - Imports the configuration from a file.
initiate - Initiates an operation.
set - Sets configuration information.
show - Displays information.
scope <scope-ip-address> - To switch to the scope identified by
the IP Address.
mscope <mscope-name> - To switch to the mscope identified by
the MScope name.


netsh dhcp server>list
list - Lists all the commands available.
dump - Dumps configuration to a text file.
help - Displays help.
? - Displays help.

add class - Adds a class to the server.
add mscope - Adds a multicast scope to the server.
add optiondef - Adds a new option to the server.
add scope - Adds a scope to the Server.

delete class - Deletes a specific class from the server.
delete dnscredentials - Sets the credentials to use for DNS
updates
delete mscope - Deletes a multicast scope from the Server.
delete optiondef - Deletes an option from the Server.
delete optionvalue - Deletes an option value from the server.
delete scope - Deletes a scope from the Server.
delete superscope - Deletes a superscope from the Server.

export - Exports configuration of the server.

import - Imports configuraiton of the server.

initiate auth - Initiates retry authorization with the
server.
initiate reconcile - Checks and reconciles the database for all
scopes under the server.

set auditlog - Sets the audit log parameters for the
server.
set databasebackupinterval - Sets the database backup interval of the
current server.
set databasebackuppath - Sets the database backup path for the
Server.
set databasecleanupinterval - Sets the database clean up interval.
set databaseloggingflag - Sets/resets the database logging flag.
set databasename - Sets the name of the server database file.
set databasepath - Sets the path of the server database file.
set databaserestoreflag - Sets/Resets the database restore flag.
set detectconflictretry - Sets the number of conflict detection
attempts
by the DHCP server.
set dnscredentials - Sets the credentials to use for DNS updates
set dnsconfig - Sets the Dynamic DNS configuration for the
Serve
r.
set optionvalue - Sets the global option value for the Server.
set server - Sets the current server in the Server mode.
set userclass - Sets the global user class name for
subsequent operation.
set vendorclass - Sets the global vendor class name for
subsequent operation.

show all - Displays all information for the Server.
show auditlog - Displays the Audit log settings for the
server.
show bindings - Displays Binding information for the server.
show class - Displays all available classes for the
Server.
show detectconflictretry - Displays the detect conflict retry settings.
show dnsconfig - Displays the dynamic DNS configuration for
the
server.
show dnscredentials - Displays the currently set DNS credentials.
show mibinfo - Displays MIBInfo for the Server.
show mscope - Displays all multicast scopes for the
Server.
show optiondef - Displays all options for the Server.
show optionvalue - Displays all optionvalues that are set for
the
server.
show scope - Displays all available scopes under the
Server.
show server - Displays the current Server.
show dbproperties - Displays server database configuration
information.
show serverstatus - Displays the current status for the Server.
show userclass - Displays the currently set user class name.
show vendorclass - Displays the currently set vendor class
name.
show version - Displays the current version of the Server.

scope <scope-ip-address> - To switch to the scope identified by
the IP Address.
mscope <mscope-name> - To switch to the mscope identified by
the MScope name.




"James Tee Stain" <Cobalt_blueuk@xxxxxxxxx> wrote in message
news:MBeBe.133932$Vo6.101310@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> HiYa,
>
> Anyone got any quick links or coding to access the IP address of a
reserved
> machine (server, router, printer, RIB card etc) in a Windows 2000 DHCP
> server using VB Scripting.
>
> I can only find C++ stuff which is leagues above my head and also banned
> (anyway) for security reasons, as the code needs to be transparent to
anyone
> who wishes to check it.
>
> TIA.
>
> James.
>
>


.



Relevant Pages

  • SecurityFocus Microsoft Newsletter #154
    ... MICROSOFT VULNERABILITY SUMMARY ... ISS RealSecure Server Sensor SSL Denial Of Service Vulnerabi... ... Roger Wilco Remote Server Side Buffer Overrun Vulnerability ... available for Microsoft Windows operating systems. ...
    (Focus-Microsoft)
  • SecurityFocus Microsoft Newsletter #49
    ... Subject: SecurityFocus Microsoft Newsletter #49 ... Microsoft Windows NNTP Denial of Service Vulnerability ... Microsoft IIS SSI Buffer Overrun Privelege Elevation Vulnerability ... Microsoft ISA Server H.323 Memory Leak Denial of Service... ...
    (Focus-Microsoft)
  • ~~~~~~~~~~~~~~~ CANNOT FIND ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ... cannot find server or dns error ... windows cannot find null ... windows cannot find the network path ... cannot find internet explorer on computer ...
    (comp.protocols.snmp)
  • Questions Relating to Administering Windows 2000 Server
    ... installed the network client on the target computer. ... Sarah has been attempting to install Windows 2000 ... Server for two days. ... Sarah has checked the cables and hard drives. ...
    (microsoft.public.cert.exam.mcse)
  • pqv¼Ò¹ÚÇÑ ²Þ@mBGRx
    ... O-009¹Ù¢Ã MS Windows 2000 Datacenter Server -2¸¸¿ø ... Main Application (Borland C++ Builder 6 Enterprise Edition) ... Y-166¢Ã Sex Starved Sluts 1 (Divx) ...
    (FreeBSD-Security)