"objectclass -eq 'dhcpclass' -AND Name -ne 'dhcproot'" | select name | Out-File c:\typeyourpathhereįeel free to drop your comment or question below. Get-ADObject -SearchBase "cn=configuration,dc=contoso,dc=com" -Filter In case you want to export the results into a text file use the following syntax. "objectclass -eq 'dhcpclass' -AND Name -ne 'dhcproot'" | select name Hi, The following article describes how to get he DHCP scope information via Powershell: GET DHCP Scope.This is part of a daily server check that we do. I am trying to make a simple check against servers to see if the DHCP scopes are available. Query AD for Authorized DHCP Servers, make sure you use the forest tree root domain. I am seeing a ton of scripts that go well beyond the check against DHCP, things like creating scopes, etc. # Import the ActiveDirectory module if it is not loaded Get-Module -Name ActiveDirectory -ListAvailable # Check if the ActiveDirectory module is available # Check if the ActiveDirectory module is Loaded Fortunately, the following Powershell cmdlet saved me a lot of time and I wanted to share it with you.įirst of all, you need to make sure that the following module is loaded in order to use the cmdlet that meets our needs. Collecting DHCP scopes monitoring results from multiple DHCP servers. Last week, I needed to quickly find out all the Authorized DHCP Servers in the AD Forest.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |