Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

DHCP Server Cmdlets in Windows PowerShell

Updated: January 9, 2013

Applies To: Windows Server 2012

Windows PowerShell® is a task-based command-line shell and scripting language designed especially for system administration. This reference topic for the information technology (IT) professional provides assistance in utilizing the Windows PowerShell cmdlets to script and automate tasks.

Dynamic Host Configuration Protocol (DHCP) server service

This reference provides cmdlet descriptions and syntax for all Dynamic Host Configuration Protocol (DHCP) server service-specific cmdlets. It lists the cmdlets in alphabetical order based on the verb at the beginning of the cmdlet.

Also see DHCP Classes (http://go.microsoft.com/FWLink/p/?LinkId=260590).

 

cmdlet Description

Add-DhcpServerInDC

Adds the computer running the DHCP server service to the list of authorized Dynamic Host Configuration Protocol (DHCP) server services in Active Directory (AD).

Add-DhcpServerv4Class

Adds an IPv4 vendor or user class to the Dynamic Host Configuration Protocol (DHCP) server service.

Add-DhcpServerv4ExclusionRange

Adds a range of excluded IP addresses for an IPv4 scope.

Add-DhcpServerv4Failover

Adds a new IPv4 failover relationship on the Dynamic Host Configuration Protocol (DHCP) server service.

Add-DhcpServerv4FailoverScope

Adds one or more specified scopes to the failover relationship.

Add-DhcpServerv4Filter

Adds a MAC address filter to the Dynamic Host Configuration Protocol (DHCP) server service.

Add-DhcpServerv4Lease

Adds a new IPv4 address lease in the Dynamic Host Configuration Protocol (DHCP) server service.

Add-DhcpServerv4OptionDefinition

Adds a new DHCPv4 option definition on the Dynamic Host Configuration Protocol (DHCP) server service.

Add-DhcpServerv4Policy

Adds a new policy either at the server level or at the scope level.

Add-DhcpServerv4PolicyIPRange

Adds an IP range to an existing policy at the scope level.

Add-DhcpServerv4Reservation

Reserves the specified IPv4 address in the scope for a client.

Add-DhcpServerv4Scope

Adds an IPv4 scope on the Dynamic Host Configuration Protocol (DHCP) server service.

Add-DhcpServerv4Superscope

Adds one or more specified scopes to a superscope.

Add-DhcpServerv6Class

Adds an IPv6 vendor or user class to the Dynamic Host Configuration Protocol (DHCP) server service.

Add-DhcpServerv6ExclusionRange

Sets the range of IPv6 addresses to exclude from an IPv6 scope.

Add-DhcpServerv6Lease

Adds a new IPv6 address lease to the Dynamic Host Configuration Protocol (DHCP) server service.

Add-DhcpServerv6OptionDefinition

Adds a DHCPv6 option definition to a Dynamic Host Configuration Protocol (DHCP) server service running on the local or a remote computer.

Add-DhcpServerv6Reservation

Adds an IPv6 Reservation to an IPv6 prefix or scope.

Add-DhcpServerv6Scope

Adds an IPv6 scope to the Dynamic Host Configuration Protocol (DHCP) server service with the specified parameters.

Backup-DhcpServer

Backs up the Dynamic Host Configuration Protocol (DHCP) database of DHCP server service to the specified location.

Export-DhcpServer

Exports the Dynamic Host Configuration Protocol (DHCP) server service configuration, and optionally lease data, to the specified file.

Get-DhcpServerAuditLog

Gets the configuration parameters related to the audit log of the Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerDatabase

Gets the configuration parameters related to the database of the Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerInDC

Retrieves the list of authorized computers running the Dynamic Host Configuration Protocol (DHCP) server service from Active Directory (AD).

Get-DhcpServerSetting

Gets the configuration parameters of the database of the Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerv4Binding

Gets all of the IPv4 interfaces on the computer to which the Dynamic Host Configuration Protocol (DHCP) server service is bound.

Get-DhcpServerv4Class

Retrieves an IPv4 vendor or user class from the Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerv4DnsSetting

Gets the DNS settings configured on the Dynamic Host Configuration Protocol (DHCP) server service for a specific scope, reservation, or server level.

Get-DhcpServerv4ExclusionRange

Returns the IPv4 address ranges excluded from the specified scope identifiers (IDs).

Get-DhcpServerv4Failover

Gets the failover relationships configured on the Dynamic Host Configuration Protocol (DHCP) server service for the specific failover relationship name.

Get-DhcpServerv4Filter

Gets the list of all MAC addresses from the allow list or the deny list on the Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerv4FilterList

Gets the enabled state of the allow filter list and deny filter list set on the Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerv4FreeIPAddress

Gets one or more free, or unassigned, IP Addresses from the specified scope.

Get-DhcpServerv4Lease

Gets one or more lease records from the Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerv4OptionDefinition

Gets the DHCPv4 option definition for the specified option identifiers (IDs).

Get-DhcpServerv4OptionValue

Returns the IPv4 option Values for one or more IPv4 options at the server, scope or reservation level.

Get-DhcpServerv4Policy

Gets one or more policies at the server level or the scope level.

Get-DhcpServerv4PolicyIPRange

Gets one or more IP ranges from a policy in the specified scope.

Get-DhcpServerv4Reservation

Gets one or more IPv4 reservations for the specified IP addresses or client identifiers (IDs).

Get-DhcpServerv4Scope

Returns the IPv4 scope configuration of the specified scopes.

Get-DhcpServerv4ScopeStatistics

Gets the IPv4 scope statistics corresponding to the IPv4 scope identifiers (IDs) specified for a Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerv4Statistics

Gets Dynamic Host Configuration Protocol (DHCP) server service statistics for IPv4.

Get-DhcpServerv4Superscope

Gets Dynamic Host Configuration Protocol (DHCP) server service statistics for IPv4.

Get-DhcpServerv6Binding

Returns the IPv6 interfaces to which the Dynamic Host Configuration Protocol (DHCP) server service is bound.

Get-DhcpServerv6Class

Gets the IPv6 vendor or user class from the Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerv6DnsSetting

Gets the DNS settings configured on the Dynamic Host Configuration Protocol (DHCP) server service for a specific scope, reservation, or server-wide.

Get-DhcpServerv6ExclusionRange

Gets the IPv6 address ranges excluded from the specified IPv6 subnet prefix.

Get-DhcpServerv6FreeIPAddress

Gets one or more free, or unassigned, IPv6 addresses from the specified scope.

Get-DhcpServerv6Lease

Gets one or more IPv6 lease records from the Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerv6OptionDefinition

Gets the option definition for the option identified by the option identifier (ID).

Get-DhcpServerv6OptionValue

Returns the IPv6 option values for one or more IPv6 options either for a specific reserved IP, scope or, server level.

Get-DhcpServerv6Reservation

Returns the reserved IPv6 addresses on the Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerv6Scope

Gets the scope information for the specified IPv6 prefixes on the Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerv6ScopeStatistics

Gets the IPv6 prefix statistics that correspond to the IPv6 prefix specified for a Dynamic Host Configuration Protocol (DHCP) server service.

Get-DhcpServerv6StatelessStatistics

Gets a list of IPv6 subnet prefixes which have stateless clients and the number of addresses in use in each of the subnets.

Get-DhcpServerv6StatelessStore

Gets the properties of IPv6 stateless store for the specified IPv6 subnet.

Get-DhcpServerv6Statistics

Gets the Dynamic Host Configuration Protocol (DHCP) server service statistics for IPv6.

Get-DhcpServerVersion

Gets the version of the Dynamic Host Configuration Protocol (DHCP) server service.

Import-DhcpServer

Imports the Dynamic Host Configuration Protocol (DHCP) server service configuration, and optionally lease data, from the specified file.

Invoke-DhcpServerv4FailoverReplication

Replicates scope configuration between failover partner Dynamic Host Configuration Protocol (DHCP) server services.

Remove-DhcpServerInDC

Deletes the specified Dynamic Host Configuration Protocol (DHCP) server service from the list of authorized server services in Active Directory (AD).

Remove-DhcpServerv4Class

Deletes the IPv4 vendor class or user class from a Dynamic Host Configuration Protocol (DHCP) server service.

Remove-DhcpServerv4ExclusionRange

Deletes a range of IPv4 addresses that were previously excluded from an IPv4 scope.

Remove-DhcpServerv4Failover

Removes one or more specified failover relationships.

Remove-DhcpServerv4FailoverScope

Removes the specified scopes from the failover relationship.

Remove-DhcpServerv4Filter

Deletes the specified MAC address or MAC address pattern from the allow list or the deny list of the Dynamic Host Configuration Protocol (DHCP) server service.

Remove-DhcpServerv4Lease

Deletes the specified IPv4 address lease record from the Dynamic Host Configuration Protocol (DHCP) server service.

Remove-DhcpServerv4OptionDefinition

Delete one or more IPv4 option definitions from a Dynamic Host Configuration Protocol (DHCP) server service.

Remove-DhcpServerv4OptionValue

Deletes one or more IPv4 option values at the server, scope or reservation level, either for the standard IPv4 options or for the specified vendor or user class.

Remove-DhcpServerv4Policy

Deletes one or more specified IPv4 policies either at the server level or the specified scope level.

Remove-DhcpServerv4PolicyIPRange

Deletes an IP range from an existing policy at the scope level.

Remove-DhcpServerv4Reservation

Deletes the IPv4 Reservation from the specified scope.

Remove-DhcpServerv4Scope

Deletes the specified IPv4 scopes from the Dynamic Host Configuration Protocol (DHCP) server service.

Remove-DhcpServerv4Superscope

Removes one or more specified scopes from a superscope.

Remove-DhcpServerv6Class

Deletes the specified IPv6 vendor class or user class from a Dynamic Host Configuration Protocol (DHCP) server service.

Remove-DhcpServerv6ExclusionRange

Deletes a range of IPv6 addresses previously excluded from an IPv6 scope.

Remove-DhcpServerv6Lease

Deletes one or more IPv6 lease records from the Dynamic Host Configuration Protocol (DHCP) server service.

Remove-DhcpServerv6OptionDefinition

Deletes one or more IPv6 option definitions from the Dynamic Host Configuration Protocol (DHCP) server service.

Remove-DhcpServerv6OptionValue

Deletes one or more DHCPv6 option values set at the reservation level, scope level, or server level, either for the standard IPv6 options or for a specified vendor class.

Remove-DhcpServerv6Reservation

Deletes one or more IPv6 reservations from the specified scope.

Remove-DhcpServerv6Scope

Deletes the IPv6 Scopes from the Dynamic Host Configuration Protocol (DHCP) server service corresponding to the specified prefixes.

Restore-DhcpServer

Restores the database of the Dynamic Host Configuration Protocol (DHCP) server service from the specified location.

Set-DhcpServerAuditLog

Sets the Dynamic Host Configuration Protocol (DHCP) server service audit log configuration on the DHCP server service running on the computer.

Set-DhcpServerDatabase

Modifies one or more configuration parameters of the database of the Dynamic Host Configuration Protocol (DHCP) server service.

Set-DhcpServerSetting

Sets one or more server level configuration parameters for the Dynamic Host Configuration Protocol (DHCP) server service.

Set-DhcpServerv4Binding

Sets the binding state of specified IPv4 interface for the Dynamic Host Configuration Protocol (DHCP) server service running on the specified computer.

Set-DhcpServerv4Class

Modifies an IPv4 vendor class or user class on the Dynamic Host Configuration Protocol (DHCP) server service with the specified parameters.

Set-DhcpServerv4DnsSetting

Configures how the Dynamic Host Configuration Protocol (DHCP) server service updates the DNS server with the client-related information.

Set-DhcpServerv4Failover

Modifies the properties of an existing failover relationship.

Set-DhcpServerv4FilterList

Sets the enabled state for the allow, the deny, or both the allow and deny MAC address filter lists on the Dynamic Host Configuration Protocol (DHCP) server service.

Set-DhcpServerv4OptionDefinition

Modifies the properties of an existing IPv4 option definition.

Set-DhcpServerv4OptionValue

Sets an IPv4 option value at the server, scope, or reservation level.

Set-DhcpServerv4Policy

Sets the properties of an existing policy either at the server level or at the specified scope level.

Set-DhcpServerv4Reservation

Modifies the properties of an IPv4 reservation.

Set-DhcpServerv4Scope

Sets the properties of an existing IPv4 scope on the Dynamic Host Configuration Protocol (DHCP) server service.

Set-DhcpServerv6Binding

Sets the binding state for the specified IPv6 interface of the Dynamic Host Configuration Protocol (DHCP) server service on the computer.

Set-DhcpServerv6Class

Modifies the properties of an IPv6 vendor or user class on the Dynamic Host Configuration Protocol (DHCP) server service.

Set-DhcpServerv6DnsSetting

Configures how the Dynamic Host Configuration Protocol (DHCP) server service updates the DNS server with the client-related information

Set-DhcpServerv6OptionDefinition

Modifies the properties of an existing DHCPv6 option definition.

Set-DhcpServerv6OptionValue

Sets an IPv6 option value at the server, scope, or reservation level.

Set-DhcpServerv6Reservation

Modifies the properties of the specified IPv6 reservation.

Set-DhcpServerv6Scope

Modifies the properties of the IPv6 scope on the Dynamic Host Configuration Protocol (DHCP) server service.

Set-DhcpServerv6StatelessStore

Sets the properties of IPv6 stateless store for the specified IPv6 prefix.

noteNote
To list all the cmdlets that are available, use the Get-Command –Module DhcpServer cmdlet.

For more information about, or for the syntax of, any of the cmdlets, use the Get-Help <cmdlet name> cmdlet, where <cmdlet name> is the name of the cmdlet that you want to research. For more detailed information, you can run any of the following cmdlets:

Get-Help <cmdlet name> -Detailed
Get-Help <cmdlet name> -Examples
Get-Help <cmdlet name> -Full

More Information

For more information about the cmdlets, see the following:

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.