StevensNet.com

...Because someone's gotta tell the story...

Blogs

To return to the main Blog List, click Full Blog Listing.

Tags

Active Directory

Verifying an Authorized DHCP in Active Directory

Tuesday, May 02, 2017 in Active Directory (Views: 371)
Just a quick blog on DHCP, how on earth do you verify that a DHCP server is authorized?

A simple boolean query will take care of this as well as the get-dhcpserverindc command:

Assume your DHCP Server is at IP 192.168.1.1.

if ([bool](Get-DhcpServerInDC | Where-Object {$_.ipaddress -eq "192.168.1.1"}))
{Write-Host "It exists"}
else
{Write-Host "It doesn't"}


That's it. Happy scripting.

 

Related Blogs You May Be Interested In:


To leave a comment, please log in and/or register.