Managing DHCP on DHCP server:
Add-WindowsFeature -Name DHCP –IncludeManagementTools
Managing DHCP on remote host:
Add-WindowsFeature RSAT-DHCP
Powershell DHCP Module:
Import-Module DhcpServer
Get all DHCP servers in AD
Get-DhcpServerInDC
Get DHCP scope configuration
Get-DhcpServerv4Scope –ComputerName <DHCPServerName>
Get DHCP reservations on scope:
Get-DhcpServerv4Reservation -ComputerName <DHCPServerName> -ScopeId <ScopeID>
Import/Export DHCP Scopes
netsh dhcp server export C:\temp\DHCP.txt all
netsh dhcp server import C:\temp\DHCP.txt all
Note: The temp folder needs to be created
Check DHCP Replication Failover Status
Get-DhcpServerv4Failover -ComputerName <DHCPServerName>
Reference:
https://technet.microsoft.com/en-us/library/jj590708(v=wps.630).aspx