다음을 통해 공유


DHCP Server PowerShell Module

NOTE: This article applies to Windows 2012 R2 and above with the DHCP role and Management Tools installed (Add-WindowsFeature -Name DHCP -IncludeManagementTools )

This is a new PowerShell module we can use to manage DHCP server using PowerShell commands. We can list all the DHCP server related commands using

Get-Command -Module DHCPServer

which are shown in the picture. This article includes some useful PowerShell commands which are related to DHCP module. There are 121 commands available in this PowerShell Module.

Get-DHCPServerv4Binding

Using this command we can retrieve the IP address which is bound to the DHCP Server

Get-DHCPServerv4Scope

Using above command we can list all the available ipv4 scopes in the  DHCP server.

Add-DCHPServerv4Reservation

Using this command we can do IP reservation on specific MAC addresses. If we have multiple reservations we can perform that task of integrating csv file also (import-csv).

Backup-DhcpServer

Using this command we can backup the DHCP server configurations.