PS - Query AD for DHCP Servers

The following PowerShell command can be used to query AD for DHCP servers:

Get-DhcpServerInDC

Or PowerShell 2.0


(Get-ADObject -SearchBase "cn=configuration,dc=endava,dc=net" -Filter "objectclass -eq 'dhcpclass' -AND Name -ne 'dhcproot'").name

Comments