Because Dhcpmgmt.msc is not available in RSAT for Windows 10, PowerShell is a good option to remotely administer your DHCP server. This post is a collection of the most common PowerShell commands for configuring DHCP in your network.

Add the DHCP server object in the Active Directory domain for the specified server and authorize the server service to serve DHCP clients on the network.

Add-DhcpServerInDC -DnsName -IPAddress

Add the security groups DHCP Users and DHCP Administrators to the DHCP server. (DHCP Users have view-only access to the DHCP server, and DHCP Administrators can administer the DHCP server.)

Add-DHCPServerSecurityGroup -ComputerName "DHCPServer"

Set credentials that the DHCP Server service uses to register or deregister client records on a DNS server.

Set-DHCPServerDnsCredential -ComputerName "DHCPServer"

After you issue this command, the cmdlet prompts you to enter the credentials.

Set DHCP server credentials with Set-DhcpServerDnsCredentials

Set DHCP server credentials with Set-DhcpServerDnsCredentials

Add a scope for the IP address range through

Add-DHCPServerv4Scope -EndRange -Name LAN1 -StartRange -SubnetMask -State Active

Set the DHCP server options for DNS server, DNS domain, and router.

Set-DHCPServerv4OptionValue -ComputerName -DnsServer -DnsDomain -Router

To list the configured options, you can use the following command:

Get-DHCPServerv4OptionValue -ComputerName DHCPServer | Format-List

Set the scope options on the specified scope for DNS server, DNS domain, and router.

Set-DHCPServerv4OptionValue -ComputerName -ScopeId -DnsServer -DnsDomain -Router

To list the configured scope options, use this command:

Get-DHCPServerv4OptionValue -ComputerName DHCPServer -ScopeId | Format-List

See which scopes are hosted on your DHCP server.

To see all IPv4 scopes, use this command:


To see all IPv6 scopes, use this command:


Exclude the IP address range from through from the scope on the DHCP server named DHCPServer.

Add-Dhcpserverv4ExclusionRange -ComputerName DHCPServer -ScopeId -StartRange -EndRange

Create a reservation for a client.

First, you can get all leases with the following command:

Get-DHCPServerv4Lease -ScopeId

The output will look like this:

DHCP server leases

DHCP server leases

If you want to create a reservation for the client with the IP address, type this:

Get-DhcpServerv4Lease -ComputerName dhcpserver -IPAddress | Add-DhcpServerv4Reservation -ComputerName dhcpserver

You can also do a bulk import by using a csv file. The csv file should contain the reservations in the following format:

ScopeId,IPAddress,Name,ClientId,Description,,Client1,6a-1b-5c-1d-4e-1f,Reservation Client1,,Client2,6a-2b-5c-2d-2e-4f,Reservation Client2

Save the file to c:\dhcp\ClientReservations.csv and run the following command to import the reservations:

Import-Csv –Path c:\dhcp\ClientReservations.csv | Add-DhcpServerv4Reservation -ComputerName DHCPServer

Disable and enable the created scope.

To disable the created scope, use this command:

Set-DhcpServerv4Scope -ComputerName DHCPServer -ScopeId -State InActive

To enable the scope, only change the value from InActive to Active:

Set-DhcpServerv4Scope -ComputerName DHCPServer -ScopeId -State Active

Remove the created scope from the DHCP server.

Remove-DHCPServerv4Scope -ComputerName DHCPServer -ScopeId -Force

Get DHCP statistics.

You can get statistics from your DHCP server for several values, such as start time, requests, scopes, and much more. To display the statistics, use this command:

Get-DhcpServerv4Statistics -ComputerName DHCPServer

The following screenshot will show you the values you can get with the command.

DHCP server statistics

DHCP server statistics

You can display the same for a scope by using Get-DhcpServerv4ScopeStatistics.

Create an active multicast scope.

This command creates a multicast scope with the defined values:

Add-DhcpServerv4MulticastScope -ComputerName DHCPServer -Name "Multicast_Range1" -StartRange -EndRange

Create and remove a Superscope.

To create a Superscope, use this command:

Add-DhcpServerv4Superscope -ComputerName DHCPServer -SuperscopeName "SupScopeLab1" -ScopeId,

To remove a Superscope, use this command:

Remove-DhcpServerv4Superscope -ComputerName DHCPServer -SuperscopeName "SupScopeLab1"

Add a DHCP option definition to your server.

To add the option definition for WPAD, use this command:

Add-DhcpServerv4OptionDefinition -ComputerName DHCPServer -Name WPAD -OptionId 252 -Type String

Export and import your DHCP server configuration.

To export the configuration of the DHCP server to the specified XML file, use this command:

Export-DHCPServer -ComputerName DHCPServer -File C:\dhcp\dhcp.xml

To import the exported data to another server named DHCPServer2, use this command:

Import-DHCPServer -ComputerName DHCPServer2 -File C:\dhcp\dhcp.xml -BackupPath C:\dhcpbackup\
  1. Avatar
    Roy 8 years ago

    So, I have these WAPs that are being assigned IPs via DHCP. I’d like to have them grouped all in the same range instead haphazardly throughout my whole scope. is this possible? seems like it would involve some piping and sorting of commands…

  2. Avatar
    Prarthana 10 months ago


    I need to fetch DHCP scope statistics using powershell.
    Please help me to get below informations.
    Description Details
    Total Addresses 254
    In Use 0 (0%)
    Available 254 (100%)
    Addresses Available (this Server’s Pool) 229 (90%)
    Addresses Available (Partner Pool) 25 (9%)
    Addresses granted (this Server’s Pool) 0 (0%)
    Addresses granted (Partner Pool) 0 (0%)

Leave a reply

Your email address will not be published. Required fields are marked *


© 4sysops 2006 - 2023


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account