Compartir a través de


Use DHCP commands non-interactively or in scripts

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

To use DHCP commands non-interactively or in scripts

  1. Open Command Prompt.

  2. At the command prompt or in scripted usage, you can use Netsh commands for DHCP non-interactively by using the following fully qualified command syntax:

    netsh dhcp server [**\\**ServerName] SubCommand

Notes

  • You must be a member of the Administrators group or the DHCP Administrators group to administer DHCP servers using the DHCP console or the Netsh commands for DHCP. You should restrict the membership of these groups to the minimum number of users necessary to administer the server. In addition, only members of the Domain Admins group can authorize or unauthorize a DHCP server in Active Directory. If there are users who need read-only access to the DHCP console, add them to the DHCP Users group instead of the DHCP Administrators group. For more information about using Netsh commands for DHCP, see Related Topics.

  • To open a command prompt, click Start, point to All programs, point to Accessories, and then click Command prompt.

  • The **\\**ServerName parameter is optional and can be left unspecified if you are performing commands locally at the DHCP server. If the server being managed is remote, this parameter is required, and the name of the server must be specified.

Information about functional differences

  • Your server might function differently based on the version and edition of the operating system that is installed, your account permissions, and your menu settings. For more information, see Viewing Help on the Web.

See Also

Concepts

Managing DHCP from the command line
Use DHCP commands interactively at the command prompt
Configure the command prompt
Netsh commands for DHCP